|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.beandocument.BeanElementFactory
Helper class to analyze a bean for its behavior and data and generate the corresponding element types
Constructor Summary | |
protected |
BeanElementFactory()
Constructs a new analyzer |
Method Summary | |
void |
addElementMapping(java.lang.Class match,
java.lang.Class handler)
Adds a handler class to the content element handlers list. |
void |
addExcludeFilter(BeanContentFilter filter)
Adds an exclude filter to the set of member exclusion filters |
void |
addIncludeFilter(BeanContentFilter filter)
Adds an include filter to the set of member inclusion filters |
BeanNodeList |
evaluateChilds(BeanBaseNode parent,
java.lang.Object bean)
Evaluates the provided bean and captures all retrievable element from it as node list containing all elements. |
boolean |
filterOK(BeanBaseNode parent,
java.lang.Object bean,
java.lang.String name,
java.lang.Object value)
Checks if the given element applies to all required filters which were defined for the document. |
BeanElement |
getElementForObject(BeanBaseNode parent,
java.lang.String name,
java.lang.Object bean)
Analyzes the given object and created + returns the correct Element matching to the requested object |
void |
setMaxDepth(int max)
Sets the maximum evaluation depth for element nodes |
protected void |
setOwner(BeanDocument owner)
Sets the owner for the factory |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected BeanElementFactory()
Method Detail |
public BeanNodeList evaluateChilds(BeanBaseNode parent, java.lang.Object bean)
parent
- Parent element for the new created element listbean
- Object to evaluate
public BeanElement getElementForObject(BeanBaseNode parent, java.lang.String name, java.lang.Object bean)
parent
- Parent node to pass as parent for construction new elementsname
- Name for the new Element to createbean
- Object to evaluate and create element from
public void addElementMapping(java.lang.Class match, java.lang.Class handler) throws java.lang.IllegalArgumentException
match
- Class of which the bean need to be instance of. If null, the default handler will be overridden.handler
- Handler class which will generate the element. This must me subclass of BeanElement
java.lang.IllegalArgumentException
- if hander is invalidprotected void setOwner(BeanDocument owner)
owner
- Owner document for this instancepublic void setMaxDepth(int max)
max
- Maximum depth to evaluatepublic void addIncludeFilter(BeanContentFilter filter)
filter
- Filter to add to the filter chainpublic void addExcludeFilter(BeanContentFilter filter)
filter
- Filter to add to the filter chainpublic boolean filterOK(BeanBaseNode parent, java.lang.Object bean, java.lang.String name, java.lang.Object value)
parent
- Parent element for the new content elementsbean
- Bean which contains the content which is evaluatedname
- Name of the membervalue
- Value of the member
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |