Package aQute.lib.xmldtoparser
Class DomDTOParser
java.lang.Object
aQute.lib.xmldtoparser.DomDTOParser
Parse an XML file based on a DTO as schema
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Field
private static <T> void
private static <T> T
private static String
private static boolean
isCollection
(Class<?> class1) private static boolean
private static boolean
static <T> T
parse the given XML file based on the type as the schema.static <T> T
parse
(Class<T> type, InputStream doc) parse the given XML file based on the type as the schema.private static <T> T
private static void
private static String
toSimpleName
(String nodeName)
-
Field Details
-
dbf
-
-
Constructor Details
-
DomDTOParser
public DomDTOParser()
-
-
Method Details
-
parse
parse the given XML file based on the type as the schema. Attributes and elements are mapped to fields in an object of this type. If the field is a collection or a DTO type, the parse will be recursive.- Parameters:
type
- the type acting as schemedoc
- the file- Returns:
- a DTO of type
- Throws:
Exception
-
parse
parse the given XML file based on the type as the schema. Attributes and elements are mapped to fields in an object of this type. If the field is a collection or a DTO type, the parse will be recursive.- Parameters:
type
- the type acting as schemedoc
- the file- Returns:
- a DTO of type
- Throws:
Exception
-
parse
- Throws:
Exception
-
get
- Throws:
Exception
-
getName
-
toSimpleName
-
isSimple
-
isCollection
-
findField
- Throws:
Exception
-
setField
- Throws:
Exception
-
getField
- Throws:
Exception
-
isStatic
-