public class ObjectValue extends AtomicValue
EMPTY_CLASS_ARRAYEMPTY_VALUE_ARRAYEVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD| Constructor and Description |
|---|
ObjectValue()
Default constructor for use in subclasses
|
ObjectValue(java.lang.Object object)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
AtomicValue |
convertPrimitive(BuiltInAtomicType requiredType,
boolean validate,
XPathContext context)
Convert to target data type
|
java.lang.Object |
convertToJava(java.lang.Class target,
XPathContext context)
Convert to Java object (for passing to external functions)
|
boolean |
effectiveBooleanValue(XPathContext context)
Get the effective boolean value of the value
|
boolean |
equals(java.lang.Object other)
Determine if two ObjectValues are equal
|
ItemType |
getItemType(TypeHierarchy th)
Determine the data type of the expression
|
java.lang.Object |
getObject()
Get the encapsulated object
|
java.lang.String |
getStringValue()
Get the value as a String
|
int |
hashCode()
Return a hash code to support the equals() function
|
void |
setValue(java.lang.Object value)
Set the value in this object value
|
checkPermittedContents, convert, convert, display, evaluateAsString, evaluateItem, getCardinality, getComponent, getImplementationMethod, getLength, getPrimitiveValue, getStringValueCS, getTypedValue, hasBuiltInType, iterate, process, toStringasItem, asIterator, asValue, convert, convertJavaObjectToXPath, getDependencies, getIterator, getParentExpression, getSpecialProperties, itemAt, iterateSubExpressions, makeQNameValue, optimize, promote, reduce, simplify, stringToNumber, typeCheckpublic ObjectValue()
public ObjectValue(java.lang.Object object)
object - the object to be encapsulatedpublic void setValue(java.lang.Object value)
public AtomicValue convertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context)
convertPrimitive in class AtomicValuerequiredType - type code of the required atomic typevalidate - true if validation is required. If set to false, the caller guarantees that
the value is valid for the target data type, and that further validation is therefore not required.
Note that a validation failure may be reported even if validation was not requested.context - The conversion context to be used. This is required at present only when converting to
a date or time: it provides the implicit timezone.public java.lang.String getStringValue()
getStringValue in interface ItemgetStringValue in interface ValueRepresentationgetStringValue in class AtomicValueItem.getStringValueCS()public boolean effectiveBooleanValue(XPathContext context) throws XPathException
effectiveBooleanValue in interface ExpressioneffectiveBooleanValue in class AtomicValuecontext - the evaluation context (not used in this implementation)XPathException - if any dynamic error occurs evaluating the
expressionpublic ItemType getItemType(TypeHierarchy th)
getItemType in interface ExpressiongetItemType in class Valueth - public java.lang.Object getObject()
public boolean equals(java.lang.Object other)
public int hashCode()
Valuepublic java.lang.Object convertToJava(java.lang.Class target,
XPathContext context)
throws XPathException
convertToJava in class ValueXPathException