|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.expr.JPConverter
public abstract class JPConverter
This class together with its embedded subclasses handles conversion from Java values to XPath values. The general principle is to allocate a specific JPConverter at compile time wherever possible. If there is insufficient type information to make this feasible, a general-purpose JPConverter is allocated, which in turn allocates a more specific converter at run-time to do the actual work.
Constructor Summary | |
---|---|
JPConverter()
|
Method Summary | |
---|---|
static JPConverter |
allocate(Class javaClass,
Configuration config)
Allocate a Java-to-XPath converter for a given class of Java objects |
abstract ValueRepresentation |
convert(Object object,
XPathContext context)
Convert a Java object to an equivalent XPath value |
int |
getCardinality()
Get the cardinality of the XPath value that will result from the conversion |
abstract ItemType |
getItemType()
Get the item type of the XPath value that will result from the conversion |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JPConverter()
Method Detail |
---|
public static JPConverter allocate(Class javaClass, Configuration config)
javaClass
- the class of the Java object to be converted (this may be the static type
or the dynamic type, depending when the converter is allocated)config
- the Saxon Configuration
public abstract ValueRepresentation convert(Object object, XPathContext context) throws XPathException
object
- the java object to be convertedcontext
- the XPath dynamic evaluation context
XPathException
- if the conversion is not possible or if it failspublic abstract ItemType getItemType()
public int getCardinality()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |