Home » commons-jxpath-1.3-src » org.apache.commons.jxpath » [javadoc | source]
org.apache.commons.jxpath
abstract public class: AbstractFactory [javadoc | source]
java.lang.Object
   org.apache.commons.jxpath.AbstractFactory

Direct Known Subclasses:
    VariableFactory, TestMixedModelFactory, TestDynaBeanFactory, TestDynamicPropertyFactory, TestDOMFactory, TestBeanFactory, TestJDOMFactory

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.

Method from org.apache.commons.jxpath.AbstractFactory Summary:
createObject,   declareVariable
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.commons.jxpath.AbstractFactory Detail:
 public boolean createObject(JXPathContext context,
    Pointer pointer,
    Object parent,
    String name,
    int index) 
    The parameters may describe a collection element or an individual object. It is up to the factory to infer which one it is. If it is a collection, the factory should check if the collection exists. If not, it should create the collection. Then it should create the index'th element of the collection and return true.

 public boolean declareVariable(JXPathContext context,
    String name) 
    Declare the specified variable