|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.apache.commons.digester.Rule
|
+--org.apache.commons.betwixt.io.BeanCreateRule
BeanCreateRule is a Digester Rule for creating beans
from the betwixt XML metadata.
| Fields inherited from class org.apache.commons.digester.Rule |
digester, namespaceURI |
| Constructor Summary | |
BeanCreateRule(ElementDescriptor descriptor,
java.lang.Class beanClass)
Convenience constructor which uses ID's for matching. |
|
BeanCreateRule(ElementDescriptor descriptor,
java.lang.Class beanClass,
boolean matchIDs)
Constructor uses standard qualified name. |
|
BeanCreateRule(ElementDescriptor descriptor,
java.lang.Class beanClass,
java.lang.String pathPrefix)
Convenience constructor which uses ID's for matching. |
|
BeanCreateRule(ElementDescriptor descriptor,
java.lang.Class beanClass,
java.lang.String pathPrefix,
boolean matchIDs)
Constructor taking a class. |
|
BeanCreateRule(ElementDescriptor descriptor,
Context context,
java.lang.String pathPrefix)
Convenience constructor which uses ID's for match. |
|
BeanCreateRule(ElementDescriptor descriptor,
Context context,
java.lang.String pathPrefix,
boolean matchIDs)
Constructor taking a context. |
|
| Method Summary | |
protected void |
addChildRules()
Adds the rules to the digester for all child elements |
protected void |
addChildRules(java.lang.String prefix,
ElementDescriptor currentDescriptor)
Add child rules for given descriptor at given prefix |
protected void |
addPrimitiveTypeRule(java.lang.String path,
ElementDescriptor childDescriptor)
Adds a new Digester rule to process the text as a primitive type |
protected void |
addRule(java.lang.String path,
org.apache.commons.digester.Rule rule)
Safely add a rule with given path. |
void |
begin(org.xml.sax.Attributes attributes)
Process the beginning of this element. |
protected java.lang.Object |
createBean(org.xml.sax.Attributes attributes)
Factory method to create new bean instances |
void |
end()
Process the end of this element. |
void |
finish()
Tidy up. |
protected BeanReader |
getBeanReader()
Get the associated bean reader. |
protected java.util.Map |
getBeansById()
Get the map used to index beans (previously read in) by id. |
protected ElementDescriptor |
getElementDescriptor(ElementDescriptor propertyDescriptor)
Allows the navigation from a reference to a property object to the descriptor defining what the property is. |
static void |
setLog(org.apache.commons.logging.Log aLog)
Set log to be used by BeanCreateRule instances |
java.lang.String |
toString()
Return something meaningful for logging. |
| Methods inherited from class org.apache.commons.digester.Rule |
body, getDigester, getNamespaceURI, setDigester, setNamespaceURI |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public BeanCreateRule(ElementDescriptor descriptor,
java.lang.Class beanClass,
java.lang.String pathPrefix)
ID's for matching.descriptor - the ElementDescriptor describing the element mappedbeanClass - the Class to be createdpathPrefix - the digester style path
public BeanCreateRule(ElementDescriptor descriptor,
java.lang.Class beanClass,
java.lang.String pathPrefix,
boolean matchIDs)
descriptor - the ElementDescriptor describing the element mappedbeanClass - the Class to be createdpathPrefix - the digester style pathmatchIDs - should ID/IDREF's be used for matching
public BeanCreateRule(ElementDescriptor descriptor,
java.lang.Class beanClass)
ID's for matching.descriptor - the ElementDescriptor describing the element mappedbeanClass - the Class to be created
public BeanCreateRule(ElementDescriptor descriptor,
java.lang.Class beanClass,
boolean matchIDs)
descriptor - the ElementDescriptor describing the element mappedbeanClass - the Class to be createdmatchIDs - should ID/IDREF's be used for matching
public BeanCreateRule(ElementDescriptor descriptor,
Context context,
java.lang.String pathPrefix)
ID's for match.descriptor - the ElementDescriptor describing the element mappedcontext - the Context to be used to evaluate expressionspathPrefix - the digester path prefix
public BeanCreateRule(ElementDescriptor descriptor,
Context context,
java.lang.String pathPrefix,
boolean matchIDs)
descriptor - the ElementDescriptor describing the element mappedcontext - the Context to be used to evaluate expressionspathPrefix - the digester path prefixmatchIDs - should ID/IDREF's be used for matching| Method Detail |
public static void setLog(org.apache.commons.logging.Log aLog)
BeanCreateRule instancesaLog - the Log implementation for this class to log topublic void begin(org.xml.sax.Attributes attributes)
begin in class org.apache.commons.digester.Ruleattributes - The attribute list of this elementpublic void end()
end in class org.apache.commons.digester.Rulepublic void finish()
finish in class org.apache.commons.digester.Ruleprotected java.lang.Object createBean(org.xml.sax.Attributes attributes)
attributes - the Attributes used to match ID/IDREFprotected void addChildRules()
protected void addChildRules(java.lang.String prefix,
ElementDescriptor currentDescriptor)
prefix - add child rules at this (digester) path prefixcurrentDescriptor - add child rules for this descriptorprotected BeanReader getBeanReader()
BeanReader
protected ElementDescriptor getElementDescriptor(ElementDescriptor propertyDescriptor)
propertyDescriptor - find descriptor for property object referenced by this descriptor
protected void addPrimitiveTypeRule(java.lang.String path,
ElementDescriptor childDescriptor)
path - digester path where this rule will be attachedchildDescriptor - update this ElementDescriptor with the body text
protected void addRule(java.lang.String path,
org.apache.commons.digester.Rule rule)
path - the digester path to add rule atrule - the Rule to addprotected java.util.Map getBeansById()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||