Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.jxpath
Class JXPathContextFactory

    java.lang.Object
      org.apache.commons.jxpath.JXPathContextFactory

Direct Known Subclasses:
  JXPathContextFactoryReferenceImpl

    public abstract class JXPathContextFactory

extends Object

Defines a factory API that enables applications to obtain a `JXPathContext` instance. To acquire a JXPathContext, first call the static `newInstance()` method of JXPathContextFactory. This method returns a concrete JXPathContextFactory. Then call `newContext(org.apache.commons.jxpath.JXPathContext, java.lang.Object)` on that instance. You will rarely need to perform these steps explicitly: usually you can call one of the `JXPathContex.newContext` methods, which will perform these steps for you.

Version:
  $Revision: 670727 $ $Date: 2008-06-23 15:10:38 -0500 (Mon, 23 Jun 2008) $
Author:
  Dmitri Plotnikov
See Also:
  `JXPathContext.newContext(Object)`, `JXPathContext.newContext(JXPathContext,Object)`

Field Summary
`static String` | `FACTORY_NAME_PROPERTY` The default property

Constructor Summary
`protected` | `JXPathContextFactory()` Create a new JXPathContextFactory.

Method Summary
`abstract JXPathContext` | `newContext(JXPathContext parentContext, Object contextBean)` Creates a new instance of a JXPathContext using the currently configured parameters.
`static JXPathContextFactory` | `newInstance()` Obtain a new instance of a `JXPathContextFactory`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### FACTORY_NAME_PROPERTY

    public static final String FACTORY_NAME_PROPERTY

  The default property

  See Also:
    Constant Field Values

Constructor Detail

### JXPathContextFactory

    protected JXPathContextFactory()

  Create a new JXPathContextFactory.

Method Detail

### newInstance

    public static JXPathContextFactory newInstance()

  Obtain a new instance of a `JXPathContextFactory`. This static method creates a new factory instance. This method uses the following ordered lookup procedure to determine the `JXPathContextFactory` implementation class to load:
  - Use the `org.apache.commons.jxpath.JXPathContextFactory` system property.
  - Alternatively, use the JAVA_HOME (the parent directory where jdk is installed)/lib/jxpath.properties for a property file that contains the name of the implementation class keyed on `org.apache.commons.jxpath.JXPathContextFactory`.
  - Use the Services API (as detailed in the JAR specification), if available, to determine the classname. The Services API will look for a classname in the file `META- INF/services/org.apache.commons.jxpath. JXPathContextFactory` in jars available to the runtime.
  - Platform default `JXPathContextFactory` instance.
  Once an application has obtained a reference to a `JXPathContextFactory` it can use the factory to obtain JXPathContext instances.

  Returns:
    JXPathContextFactory
  Throws:
    `JXPathContextFactoryConfigurationError` - if the implementation is not available or cannot be instantiated.

### newContext

    public abstract JXPathContext newContext(JXPathContext parentContext,
                                             Object contextBean)

  Creates a new instance of a JXPathContext using the currently configured parameters.

  Parameters:
    `parentContext` - parent context
    `contextBean` - Object bean
  Returns:
    JXPathContext
  Throws:
    `JXPathContextFactoryConfigurationError` - if a JXPathContext cannot be created which satisfies the configuration requested

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2008 The Apache Software Foundation. All Rights Reserved.