Class XMLWiringParser<T>
java.lang.Object
com.invirgance.convirgance.wiring.XMLWiringParser<T>
Provides facilities for loading Wiring XML files. In most circumstances, you
merely need to provide a
Custom tags can be plugged into XMLWiringParser by including a
Source to the constructor that points to the XML
file and then call getRoot to retrieve the configured object. In
cases where you wish to access objects within the structure, get(id)
can be used.
Custom tags can be plugged into XMLWiringParser by including a
/META-INF/wirings.properties file in your project, or by using
the Wiring annotation.- Author:
- jbanes
-
Constructor Summary
ConstructorsConstructorDescriptionXMLWiringParser(com.invirgance.convirgance.source.Source source) Create a new XMLWiringParser to parse the givenSource. -
Method Summary
Modifier and TypeMethodDescriptionReturns the object in the XML file with the specifiedidattribute on its tag.static PropertiesProvides a list of custom tags this parser is aware of and the classes loaded to service those tags.getRoot()Returns the object described by the XML file
-
Constructor Details
-
XMLWiringParser
public XMLWiringParser(com.invirgance.convirgance.source.Source source) Create a new XMLWiringParser to parse the givenSource.- Parameters:
source- the source from where to read the XML file
-
-
Method Details
-
getCustomTags
Provides a list of custom tags this parser is aware of and the classes loaded to service those tags.- Returns:
- A Properties object with the tag name as the key and class name as the value
-
getRoot
Returns the object described by the XML file- Returns:
- the root object in the XML file
-
get
Returns the object in the XML file with the specifiedidattribute on its tag. If theidis not found,nullis returned instead.- Parameters:
id- the string identifier to find- Returns:
-