Java Doc for JXPathContext.java in  » Library » Apache-commons-jxpath-1.2-src » org » apache » commons » jxpath » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Library » Apache commons jxpath 1.2 src » org.apache.commons.jxpath 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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

All known Subclasses:   org.apache.commons.jxpath.ri.JXPathContextReferenceImpl,
JXPathContext
abstract public class JXPathContext (Code)
JXPathContext provides APIs for the traversal of graphs of JavaBeans using the XPath syntax. Using JXPathContext, you can read and write properties of JavaBeans, arrays, collections and maps. JXPathContext uses JavaBeans introspection to enumerate and access JavaBeans properties.

JXPathContext allows alternative implementations. This is why instead of allocating JXPathContext directly, you should call a static newContext method. This method will utilize the JXPathContextFactory API to locate a suitable implementation of JXPath. Bundled with JXPath comes a default implementation called Reference Implementation.

JXPath Interprets XPath Syntax on Java Object Graphs

JXPath uses an intuitive interpretation of the xpath syntax in the context of Java object graphs. Here are some examples:

Example 1: JavaBean Property Access

JXPath can be used to access properties of a JavaBean.
public class Employee { public String getFirstName(){ ... } } Employee emp = new Employee(); ... JXPathContext context = JXPathContext.newContext(emp); String fName = (String)context.getValue("firstName");
In this example, we are using JXPath to access a property of the emp bean. In this simple case the invocation of JXPath is equivalent to invocation of getFirstName() on the bean.

Example 2: Nested Bean Property Access

JXPath can traverse object graphs:
public class Employee { public Address getHomeAddress(){ ... } } public class Address { public String getStreetNumber(){ ... } } Employee emp = new Employee(); ... JXPathContext context = JXPathContext.newContext(emp); String sNumber = (String)context.getValue("homeAddress/streetNumber");
In this case XPath is used to access a property of a nested bean.

A property identified by the xpath does not have to be a "leaf" property. For instance, we can extract the whole Address object in above example:

Address addr = (Address)context.getValue("homeAddress");

Example 3: Collection Subscripts

JXPath can extract elements from arrays and collections.
public class Integers { public int[] getNumbers(){ ... } } Integers ints = new Integers(); ... JXPathContext context = JXPathContext.newContext(ints); Integer thirdInt = (Integer)context.getValue("numbers[3]");
A collection can be an arbitrary array or an instance of java.util. Collection.

Note: in XPath the first element of a collection has index 1, not 0.

Example 4: Map Element Access

JXPath supports maps. To get a value use its key.
public class Employee { public Map getAddresses(){ return addressMap; } public void addAddress(String key, Address address){ addressMap.put(key, address); } ... } Employee emp = new Employee(); emp.addAddress("home", new Address(...)); emp.addAddress("office", new Address(...)); ... JXPathContext context = JXPathContext.newContext(emp); String homeZipCode = (String)context.getValue("addresses/home/zipCode");
Often you will need to use the alternative syntax for accessing Map elements:
String homeZipCode = (String) context.getValue("addresses[@name='home']/zipCode");
In this case, the key can be an expression, e.g. a variable.
Note: At this point JXPath only supports Maps that use strings for keys.
Note: JXPath supports the extended notion of Map: any object with dynamic properties can be handled by JXPath provided that its class is registered with the JXPathIntrospector .

Example 5: Retrieving Multiple Results

JXPath can retrieve multiple objects from a graph. Note that the method called in this case is not getValue, but iterate.
public class Author { public Book[] getBooks(){ ... } } Author auth = new Author(); ... JXPathContext context = JXPathContext.newContext(auth); Iterator threeBooks = context.iterate("books[position() < 4]");
This returns a list of at most three books from the array of all books written by the author.

Example 6: Setting Properties

JXPath can be used to modify property values.
public class Employee { public Address getAddress() { ... } public void setAddress(Address address) { ... } } Employee emp = new Employee(); Address addr = new Address(); ... JXPathContext context = JXPathContext.newContext(emp); context.setValue("address", addr); context.setValue("address/zipCode", "90190");

Example 7: Creating objects

JXPath can be used to create new objects. First, create a subclass of AbstractFactory AbstractFactory and install it on the JXPathContext. Then call JXPathContext.createPath createPathAndSetValue() instead of "setValue". JXPathContext will invoke your AbstractFactory when it discovers that an intermediate node of the path is null. It will not override existing nodes.
public class AddressFactory extends AbstractFactory { public boolean createObject(JXPathContext context, Pointer pointer, Object parent, String name, int index){ if ((parent instanceof Employee) && name.equals("address"){ ((Employee)parent).setAddress(new Address()); return true; } return false; } } JXPathContext context = JXPathContext.newContext(emp); context.setFactory(new AddressFactory()); context.createPathAndSetValue("address/zipCode", "90190");

Example 8: Using Variables

JXPath supports the notion of variables. The XPath syntax for accessing variables is "$varName".
public class Author { public Book[] getBooks(){ ... } } Author auth = new Author(); ... JXPathContext context = JXPathContext.newContext(auth); context.getVariables().declareVariable("index", new Integer(2)); Book secondBook = (Book)context.getValue("books[$index]");
You can also set variables using JXPath:
context.setValue("$index", new Integer(3));
Note: you can only change the value of an existing variable this way, you cannot define a new variable.

When a variable contains a JavaBean or a collection, you can traverse the bean or collection as well:

... context.getVariables().declareVariable("book", myBook); String title = (String)context.getValue("$book/title); Book array[] = new Book[]{...}; context.getVariables().declareVariable("books", array); String title = (String)context.getValue("$books[2]/title);

Example 9: Using Nested Contexts

If you need to use the same set of variable while interpreting XPaths with different beans, it makes sense to put the variables in a separate context and specify that context as a parent context every time you allocate a new JXPathContext for a JavaBean.
JXPathContext varContext = JXPathContext.newContext(null); varContext.getVariables().declareVariable("title", "Java"); JXPathContext context = JXPathContext.newContext(varContext, auth); Iterator javaBooks = context.iterate("books[title = $title]");

Using Custom Variable Pools

By default, JXPathContext creates a HashMap of variables. However, you can substitute a custom implementation of the Variables interface to make JXPath work with an alternative source of variables. For example, you can define implementations of Variables that cover a servlet context, HTTP request or any similar structure.

Example 10: Using Standard Extension Functions

Using the standard extension functions, you can call methods on objects, static methods on classes and create objects using any constructor. The class names should be fully qualified.

Here's how you can create new objects:

Book book = (Book) context.getValue( "org.apache.commons.jxpath.example.Book.new ('John Updike')");
Here's how you can call static methods:
Book book = (Book) context.getValue( "org. apache.commons.jxpath.example.Book.getBestBook('John Updike')");
Here's how you can call regular methods:
String firstName = (String)context.getValue("getAuthorsFirstName($book)");
As you can see, the target of the method is specified as the first parameter of the function.

Example 11: Using Custom Extension Functions

Collections of custom extension functions can be implemented as Functions Functions objects or as Java classes, whose methods become extenstion functions.

Let's say the following class implements various formatting operations:

public class Formats { public static String date(Date d, String pattern){ return new SimpleDateFormat(pattern).format(d); } ... }
We can register this class with a JXPathContext:
context.setFunctions(new ClassFunctions(Formats.class, "format")); ... context.getVariables().declareVariable("today", new Date()); String today = (String)context.getValue("format:date($today, 'MM/dd/yyyy')");
You can also register whole packages of Java classes using PackageFunctions.

Also, see FunctionLibrary FunctionLibrary , which is a class that allows you to register multiple sets of extension functions with the same JXPathContext.

Configuring JXPath

JXPath uses JavaBeans introspection to discover properties of JavaBeans. You can provide alternative property lists by supplying custom JXPathBeanInfo classes (see JXPathBeanInfo JXPathBeanInfo ).

Notes

  • JXPath does not support DOM attributes for non-DOM objects. Even though XPaths like "para[@type='warning']" are legitimate, they will always produce empty results. The only attribute supported for JavaBeans is "name". The XPath "foo/bar" is equivalent to "foo[@name='bar']".
See XPath Tutorial by W3Schools
. Also see XML Path Language (XPath) Version 1.0

You will also find more information and examples in JXPath User's Guide
author:
   Dmitri Plotnikov
version:
   $Revision: 1.25 $ $Date: 2004/06/29 21:15:46 $


Field Summary
protected  ObjectcontextBean
    
protected  HashMapdecimalFormats
    
protected  AbstractFactoryfactory
    
protected  Functionsfunctions
    
protected  IdentityManageridManager
    
protected  KeyManagerkeyManager
    
protected  JXPathContextparentContext
    
protected  Variablesvars
    

Constructor Summary
protected  JXPathContext(JXPathContext parentContext, Object contextBean)
     This constructor should remain protected - it is to be overridden by subclasses, but never explicitly invoked by clients.

Method Summary
public static  CompiledExpressioncompile(String xpath)
     Compiles the supplied XPath and returns an internal representation of the path that can then be evaluated.
abstract protected  CompiledExpressioncompilePath(String xpath)
     Overridden by each concrete implementation of JXPathContext to perform compilation.
abstract public  PointercreatePath(String xpath)
     Creates missing elements of the path by invoking an AbstractFactory, which should first be installed on the context by calling "setFactory".
abstract public  PointercreatePathAndSetValue(String xpath, Object value)
     The same as setValue, except it creates intermediate elements of the path by invoking an AbstractFactory, which should first be installed on the context by calling "setFactory".
public  ObjectgetContextBean()
     Returns the JavaBean associated with this context.
abstract public  PointergetContextPointer()
     Returns a Pointer for the context bean.
public  DecimalFormatSymbolsgetDecimalFormatSymbols(String name)
    
public  AbstractFactorygetFactory()
     Returns the AbstractFactory installed on this context. If none has been installed and this context has a parent context, returns the parent's factory.
public  FunctionsgetFunctions()
     Returns the set of functions installed on the context.
public  IdentityManagergetIdentityManager()
     Returns this context's identity manager.
public  KeyManagergetKeyManager()
     Returns this context's key manager.
public  LocalegetLocale()
     Returns the locale set with setLocale.
public  PointergetNamespaceContextPointer()
     Returns the namespace context pointer set with JXPathContext.setNamespaceContextPointer(Pointer) setNamespaceContextPointer() or, if none has been specified, the context pointer otherwise.
public  StringgetNamespaceURI(String prefix)
     Given a prefix, returns a registered namespace URI.
public  JXPathContextgetParentContext()
     Returns the parent context of this context or null.
abstract public  PointergetPointer(String xpath)
     Traverses the xpath and returns a Pointer.
public  PointergetPointerByID(String id)
     Locates a Node by its ID.
public  PointergetPointerByKey(String key, String value)
     Locates a Node by a key value.
abstract public  JXPathContextgetRelativeContext(Pointer pointer)
     Returns a JXPathContext that is relative to the current JXPathContext.
abstract public  ObjectgetValue(String xpath)
     Evaluates the xpath and returns the resulting object.
abstract public  ObjectgetValue(String xpath, Class requiredType)
     Evaluates the xpath, converts the result to the specified class and returns the resulting object.
public  VariablesgetVariables()
     Returns the variable pool associated with the context.
public  booleanisLenient()
    
abstract public  Iteratoriterate(String xpath)
     Traverses the xpath and returns an Iterator of all results found for the path.
abstract public  IteratoriteratePointers(String xpath)
     Traverses the xpath and returns an Iterator of Pointers.
public static  JXPathContextnewContext(Object contextBean)
     Creates a new JXPathContext with the specified object as the root node.
public static  JXPathContextnewContext(JXPathContext parentContext, Object contextBean)
     Creates a new JXPathContext with the specified bean as the root node and the specified parent context.
public  voidregisterNamespace(String prefix, String namespaceURI)
     Registers a namespace prefix.
abstract public  voidremoveAll(String xpath)
     Removes all elements of the object graph described by the xpath.
abstract public  voidremovePath(String xpath)
     Removes the element of the object graph described by the xpath.
public  ListselectNodes(String xpath)
     Finds all nodes that match the specified XPath.
public  ObjectselectSingleNode(String xpath)
     Finds the first object that matches the specified XPath.
public  voidsetDecimalFormatSymbols(String name, DecimalFormatSymbols symbols)
     Sets DecimalFormatSymbols for a given name.
public  voidsetFactory(AbstractFactory factory)
     Install an abstract factory that should be used by the createPath() and createPathAndSetValue() methods.
public  voidsetFunctions(Functions functions)
     Install a library of extension functions.
public  voidsetIdentityManager(IdentityManager idManager)
     Install an identity manager that will be used by the context to look up a node by its ID.
public  voidsetKeyManager(KeyManager keyManager)
     Install a key manager that will be used by the context to look up a node by a key value.
public  voidsetLenient(boolean lenient)
     If the context is in the lenient mode, then getValue() returns null for inexistent paths.
public  voidsetLocale(Locale locale)
     Set the locale for this context.
public  voidsetNamespaceContextPointer(Pointer namespaceContextPointer)
     Namespace prefixes can be defined implicitly by specifying a pointer to a context where the namespaces are defined.
abstract public  voidsetValue(String xpath, Object value)
     Modifies the value of the property described by the supplied xpath.
public  voidsetVariables(Variables vars)
     Installs a custom implementation of the Variables interface.

Field Detail
contextBean
protected Object contextBean(Code)



decimalFormats
protected HashMap decimalFormats(Code)



factory
protected AbstractFactory factory(Code)



functions
protected Functions functions(Code)



idManager
protected IdentityManager idManager(Code)



keyManager
protected KeyManager keyManager(Code)



parentContext
protected JXPathContext parentContext(Code)



vars
protected Variables vars(Code)




Constructor Detail
JXPathContext
protected JXPathContext(JXPathContext parentContext, Object contextBean)(Code)
This constructor should remain protected - it is to be overridden by subclasses, but never explicitly invoked by clients.




Method Detail
compile
public static CompiledExpression compile(String xpath)(Code)
Compiles the supplied XPath and returns an internal representation of the path that can then be evaluated. Use CompiledExpressions when you need to evaluate the same expression multiple times and there is a convenient place to cache CompiledExpression between invocations.



compilePath
abstract protected CompiledExpression compilePath(String xpath)(Code)
Overridden by each concrete implementation of JXPathContext to perform compilation. Is called by compile().



createPath
abstract public Pointer createPath(String xpath)(Code)
Creates missing elements of the path by invoking an AbstractFactory, which should first be installed on the context by calling "setFactory".

Will throw an exception if the AbstractFactory fails to create an instance for a path element.




createPathAndSetValue
abstract public Pointer createPathAndSetValue(String xpath, Object value)(Code)
The same as setValue, except it creates intermediate elements of the path by invoking an AbstractFactory, which should first be installed on the context by calling "setFactory".

Will throw an exception if one of the following conditions occurs:

  • Elements of the xpath aleady exist, but the path does not in fact describe an existing property
  • The AbstractFactory fails to create an instance for an intermediate element.
  • The property is not writable (no public, non-static set method)



getContextBean
public Object getContextBean()(Code)
Returns the JavaBean associated with this context.



getContextPointer
abstract public Pointer getContextPointer()(Code)
Returns a Pointer for the context bean.



getDecimalFormatSymbols
public DecimalFormatSymbols getDecimalFormatSymbols(String name)(Code)

See Also:   JXPathContext.setDecimalFormatSymbols(String,DecimalFormatSymbols)



getFactory
public AbstractFactory getFactory()(Code)
Returns the AbstractFactory installed on this context. If none has been installed and this context has a parent context, returns the parent's factory. Otherwise returns null.



getFunctions
public Functions getFunctions()(Code)
Returns the set of functions installed on the context.



getIdentityManager
public IdentityManager getIdentityManager()(Code)
Returns this context's identity manager. If none has been installed, returns the identity manager of the parent context.



getKeyManager
public KeyManager getKeyManager()(Code)
Returns this context's key manager. If none has been installed, returns the key manager of the parent context.



getLocale
public Locale getLocale()(Code)
Returns the locale set with setLocale. If none was set and the context has a parent, returns the parent's locale. Otherwise, returns Locale.getDefault().



getNamespaceContextPointer
public Pointer getNamespaceContextPointer()(Code)
Returns the namespace context pointer set with JXPathContext.setNamespaceContextPointer(Pointer) setNamespaceContextPointer() or, if none has been specified, the context pointer otherwise. The namespace context pointer.



getNamespaceURI
public String getNamespaceURI(String prefix)(Code)
Given a prefix, returns a registered namespace URI. If the requested prefix was not defined explicitly using the registerNamespace method, JXPathContext will then check the context node to see if the prefix is defined there. See JXPathContext.setNamespaceContextPointer(Pointer) setNamespaceContextPointer .
Parameters:
  prefix - The namespace prefix to look up namespace URI or null if the prefix is undefined.



getParentContext
public JXPathContext getParentContext()(Code)
Returns the parent context of this context or null.



getPointer
abstract public Pointer getPointer(String xpath)(Code)
Traverses the xpath and returns a Pointer. A Pointer provides easy access to a property. If the xpath matches no properties in the graph, the pointer will be null.



getPointerByID
public Pointer getPointerByID(String id)(Code)
Locates a Node by its ID.
Parameters:
  id - is the ID of the sought node.



getPointerByKey
public Pointer getPointerByKey(String key, String value)(Code)
Locates a Node by a key value.



getRelativeContext
abstract public JXPathContext getRelativeContext(Pointer pointer)(Code)
Returns a JXPathContext that is relative to the current JXPathContext. The supplied pointer becomes the context pointer of the new context. The relative context inherits variables, extension functions, locale etc from the parent context.



getValue
abstract public Object getValue(String xpath)(Code)
Evaluates the xpath and returns the resulting object. Primitive types are wrapped into objects.



getValue
abstract public Object getValue(String xpath, Class requiredType)(Code)
Evaluates the xpath, converts the result to the specified class and returns the resulting object.



getVariables
public Variables getVariables()(Code)
Returns the variable pool associated with the context. If no such pool was specified with the setVariables() method, returns the default implementation of Variables, BasicVariables BasicVariables .



isLenient
public boolean isLenient()(Code)

See Also:   JXPathContext.setLenient(boolean)



iterate
abstract public Iterator iterate(String xpath)(Code)
Traverses the xpath and returns an Iterator of all results found for the path. If the xpath matches no properties in the graph, the Iterator will be empty, but not null.



iteratePointers
abstract public Iterator iteratePointers(String xpath)(Code)
Traverses the xpath and returns an Iterator of Pointers. A Pointer provides easy access to a property. If the xpath matches no properties in the graph, the Iterator be empty, but not null.



newContext
public static JXPathContext newContext(Object contextBean)(Code)
Creates a new JXPathContext with the specified object as the root node.



newContext
public static JXPathContext newContext(JXPathContext parentContext, Object contextBean)(Code)
Creates a new JXPathContext with the specified bean as the root node and the specified parent context. Variables defined in a parent context can be referenced in XPaths passed to the child context.



registerNamespace
public void registerNamespace(String prefix, String namespaceURI)(Code)
Registers a namespace prefix.
Parameters:
  prefix - A namespace prefix
Parameters:
  namespaceURI - A URI for that prefix



removeAll
abstract public void removeAll(String xpath)(Code)
Removes all elements of the object graph described by the xpath.



removePath
abstract public void removePath(String xpath)(Code)
Removes the element of the object graph described by the xpath.



selectNodes
public List selectNodes(String xpath)(Code)
Finds all nodes that match the specified XPath.
Parameters:
  xpath - the xpath to be evaluated a list of found objects



selectSingleNode
public Object selectSingleNode(String xpath)(Code)
Finds the first object that matches the specified XPath. It is equivalent to getPointer(xpath).getNode(). Note, that this method produces the same result as getValue() on object models like JavaBeans, but a different result for DOM/JDOM etc., because it returns the Node itself, rather than its textual contents.
Parameters:
  xpath - the xpath to be evaluated the found object



setDecimalFormatSymbols
public void setDecimalFormatSymbols(String name, DecimalFormatSymbols symbols)(Code)
Sets DecimalFormatSymbols for a given name. The DecimalFormatSymbols can be referenced as the third, optional argument in the invocation of format-number (number,format,decimal-format-name) function. By default, JXPath uses the symbols for the current locale.
Parameters:
  name - the format name or null for default format.



setFactory
public void setFactory(AbstractFactory factory)(Code)
Install an abstract factory that should be used by the createPath() and createPathAndSetValue() methods.



setFunctions
public void setFunctions(Functions functions)(Code)
Install a library of extension functions.
See Also:   FunctionLibrary



setIdentityManager
public void setIdentityManager(IdentityManager idManager)(Code)
Install an identity manager that will be used by the context to look up a node by its ID.



setKeyManager
public void setKeyManager(KeyManager keyManager)(Code)
Install a key manager that will be used by the context to look up a node by a key value.



setLenient
public void setLenient(boolean lenient)(Code)
If the context is in the lenient mode, then getValue() returns null for inexistent paths. Otherwise, a path that does not map to an existing property will throw an exception. Note that if the property exists, but its value is null, the exception is not thrown.

By default, lenient = false




setLocale
public void setLocale(Locale locale)(Code)
Set the locale for this context. The value of the "lang" attribute as well as the the lang() function will be affected by the locale. By default, JXPath uses Locale.getDefault()



setNamespaceContextPointer
public void setNamespaceContextPointer(Pointer namespaceContextPointer)(Code)
Namespace prefixes can be defined implicitly by specifying a pointer to a context where the namespaces are defined. By default, NamespaceContextPointer is the same as the Context Pointer, see JXPathContext.getContextPointer() getContextPointer()
Parameters:
  contextPointer - The pointer to the context where prefixes used inXPath expressions should be resolved.



setValue
abstract public void setValue(String xpath, Object value)(Code)
Modifies the value of the property described by the supplied xpath. Will throw an exception if one of the following conditions occurs:
  • The xpath does not in fact describe an existing property
  • The property is not writable (no public, non-static set method)



setVariables
public void setVariables(Variables vars)(Code)
Installs a custom implementation of the Variables interface.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.