|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.apache.commons.jxpath.AbstractFactory
The JXPathContext.createPath() method of JXPathContext can
create missing objects as it traverses an XPath; it utilizes an AbstractFactory for that purpose.
Install a factory on JXPathContext by calling JXPathContext.setFactory().
All methods of this class return false. Override any of them to return true to indicate that the factory has successfully created the described object.
| Constructor Summary | |
AbstractFactory()
|
|
| Method Summary | |
boolean |
createObject(JXPathContext context,
Pointer pointer,
java.lang.Object parent,
java.lang.String name,
int index)
The parameters may describe a collection element or an individual object. |
boolean |
declareVariable(JXPathContext context,
java.lang.String name)
Declare the specified variable |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractFactory()
| Method Detail |
public boolean createObject(JXPathContext context,
Pointer pointer,
java.lang.Object parent,
java.lang.String name,
int index)
context - can be used to evaluate other XPaths, get to variables etc.pointer - describes the location of the node to be createdparent - is the object that will server as a parent of the new objectname - is the name of the child of the parent that needs to be created.
In the case of DOM may be qualified.index - is used if the pointer represents a collection element. You may
need to expand or even create the collection to accomodate the new element.
public boolean declareVariable(JXPathContext context,
java.lang.String name)
context - hosts variable pools. See JXPathContext.getVariables()name - is the name of the variable without the "$" sign
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||