BeanRuleSet
instead.public class BeanCreateRule
extends org.apache.commons.digester.Rule
BeanCreateRule
is a Digester Rule for creating beans
from the betwixt XML metadata.
Constructor and Description |
---|
BeanCreateRule(ElementDescriptor descriptor,
Class beanClass)
Deprecated.
Convenience constructor which uses
ID's for matching. |
BeanCreateRule(ElementDescriptor descriptor,
Class beanClass,
boolean matchIDs)
Deprecated.
Constructor uses standard qualified name.
|
BeanCreateRule(ElementDescriptor descriptor,
Class beanClass,
String pathPrefix)
Deprecated.
Convenience constructor which uses
ID's for matching. |
BeanCreateRule(ElementDescriptor descriptor,
Class beanClass,
String pathPrefix,
boolean matchIDs)
Deprecated.
Constructor taking a class.
|
BeanCreateRule(ElementDescriptor descriptor,
Context context,
String pathPrefix)
Deprecated.
Convenience constructor which uses
ID's for match. |
BeanCreateRule(ElementDescriptor descriptor,
Context context,
String pathPrefix,
boolean matchIDs)
Deprecated.
Constructor taking a context.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addChildRules()
Deprecated.
Adds the rules to the digester for all child elements
|
protected void |
addChildRules(String prefix,
ElementDescriptor currentDescriptor)
Deprecated.
Add child rules for given descriptor at given prefix
|
protected void |
addPrimitiveTypeRule(String path,
ElementDescriptor childDescriptor)
Deprecated.
Adds a new Digester rule to process the text as a primitive type
|
protected void |
addRule(String path,
org.apache.commons.digester.Rule rule)
Deprecated.
Safely add a rule with given path.
|
void |
begin(org.xml.sax.Attributes attributes)
Deprecated.
Process the beginning of this element.
|
protected Object |
createBean(org.xml.sax.Attributes attributes)
Deprecated.
Factory method to create new bean instances
|
void |
end()
Deprecated.
Process the end of this element.
|
void |
finish()
Deprecated.
Tidy up.
|
protected BeanReader |
getBeanReader()
Deprecated.
Get the associated bean reader.
|
protected Map |
getBeansById()
Deprecated.
Get the map used to index beans (previously read in) by id.
|
String |
getClassNameAttribute()
Deprecated.
The name of the attribute which can be specified in the XML to override the
type of a bean used at a certain point in the schema.
|
protected ElementDescriptor |
getElementDescriptor(ElementDescriptor propertyDescriptor)
Deprecated.
Allows the navigation from a reference to a property object to the descriptor defining what
the property is.
|
void |
setClassNameAttribute(String classNameAttribute)
Deprecated.
Sets the name of the attribute which can be specified in
the XML to override the type of a bean used at a certain
point in the schema.
|
static void |
setLog(org.apache.commons.logging.Log aLog)
Deprecated.
Set log to be used by
BeanCreateRule instances |
String |
toString()
Deprecated.
Return something meaningful for logging.
|
public BeanCreateRule(ElementDescriptor descriptor, Class beanClass, String pathPrefix)
ID's
for matching.descriptor
- the ElementDescriptor
describing the element mappedbeanClass
- the Class
to be createdpathPrefix
- the digester style pathpublic BeanCreateRule(ElementDescriptor descriptor, Class beanClass, 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 matchingpublic BeanCreateRule(ElementDescriptor descriptor, Class beanClass)
ID's
for matching.descriptor
- the ElementDescriptor
describing the element mappedbeanClass
- the Class
to be createdpublic BeanCreateRule(ElementDescriptor descriptor, Class beanClass, boolean matchIDs)
descriptor
- the ElementDescriptor
describing the element mappedbeanClass
- the Class
to be createdmatchIDs
- should ID
/IDREF
's be used for matchingpublic BeanCreateRule(ElementDescriptor descriptor, Context context, String pathPrefix)
ID's
for match.descriptor
- the ElementDescriptor
describing the element mappedcontext
- the Context
to be used to evaluate expressionspathPrefix
- the digester path prefixpublic BeanCreateRule(ElementDescriptor descriptor, Context context, 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 matchingpublic 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.Rule
attributes
- The attribute list of this elementpublic void end()
end
in class org.apache.commons.digester.Rule
public void finish()
finish
in class org.apache.commons.digester.Rule
public String getClassNameAttribute()
The default value is 'className'.
public void setClassNameAttribute(String classNameAttribute)
The default value is 'className'.
classNameAttribute
- The name of the attribute used to overload the class name of a beanprotected Object createBean(org.xml.sax.Attributes attributes)
attributes
- the Attributes
used to match ID/IDREF
protected void addChildRules()
protected void addChildRules(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 descriptorprotected void addPrimitiveTypeRule(String path, ElementDescriptor childDescriptor)
path
- digester path where this rule will be attachedchildDescriptor
- update this ElementDescriptor
with the body textprotected void addRule(String path, org.apache.commons.digester.Rule rule)
path
- the digester path to add rule atrule
- the Rule
to addprotected Map getBeansById()
Copyright © 2002-2013 Apache Software Foundation. All Rights Reserved.