|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectnet.sf.saxon.expr.PJConverter
public abstract class PJConverter
This class together with its embedded subclasses handles conversion from XPath values to Java values
| Constructor Summary | |
|---|---|
PJConverter()
|
|
| Method Summary | |
|---|---|
static PJConverter |
allocate(Configuration config,
ItemType itemType,
int cardinality,
java.lang.Class targetClass)
Factory method to instantiate a converter from a given XPath type to a given Java class |
static PJConverter |
allocateNodeListCreator(Configuration config,
java.lang.Object node)
Static method to get a converter from an XPath sequence of nodes to the representation of a NodeList in an external object model (this is really a special for DOM, which uses NodeList rather than general purpose Java collection classes) |
java.lang.String |
compile(java.lang.String var,
java.lang.Class targetClass,
CodeGeneratorService compiler)
Generate Java code to implement the type conversion |
abstract java.lang.Object |
convert(ValueRepresentation value,
java.lang.Class targetClass,
XPathContext context)
Convert an XPath value to a Java value of a specified class |
static SequenceType |
getEquivalentItemType(java.lang.Class javaClass)
Get the nearest XPath equivalent to a Java class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PJConverter()
| Method Detail |
|---|
public static SequenceType getEquivalentItemType(java.lang.Class javaClass)
javaClass - a Java class
public abstract java.lang.Object convert(ValueRepresentation value,
java.lang.Class targetClass,
XPathContext context)
throws XPathException
value - the supplied XPath valuetargetClass - the class of the required Java valuecontext - the XPath dynamic context
XPathException - if the conversion is not possible or fails
public java.lang.String compile(java.lang.String var,
java.lang.Class targetClass,
CodeGeneratorService compiler)
var - the name of a variable whose value will be the XPath ValueRepresentation
to be convertedtargetClass - the required class of the Java valuecompiler - provides supporting services by callback @return the text of a Java expression whose result will be a Java object/value of the
required type
public static PJConverter allocate(Configuration config,
ItemType itemType,
int cardinality,
java.lang.Class targetClass)
throws XPathException
config - the Saxon ConfigurationitemType - the item type of the XPath value to be convertedcardinality - the cardinality of the XPath value to be convertedtargetClass - the Java class required for the conversion result
XPathException
public static PJConverter allocateNodeListCreator(Configuration config,
java.lang.Object node)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||