org.apache.xpath.objects
public class XObject extends Expression implements Serializable, Cloneable
UNKNOWN: general
Field Summary | |
---|---|
static int | CLASS_BOOLEAN Constant for BOOLEAN object type |
static int | CLASS_NODESET Constant for NODESET object type |
static int | CLASS_NULL Constant for NULL object type |
static int | CLASS_NUMBER Constant for NUMBER object type |
static int | CLASS_RTREEFRAG Constant for RESULT TREE FRAGMENT object type |
static int | CLASS_STRING Constant for STRING object type |
static int | CLASS_UNKNOWN Constant for UNKNOWN object type |
static int | CLASS_UNRESOLVEDVARIABLE Represents an unresolved variable type as an integer. |
Constructor Summary | |
---|---|
XObject()
Create an XObject. | |
XObject(Object obj)
Create an XObject.
|
Method Summary | |
---|---|
void | allowDetachToRelease(boolean allowRelease)
Specify if it's OK for detach to release the iterator for reuse.
|
void | appendToFsb(FastStringBuffer fsb)
Cast result object to a string.
|
boolean | bool()
Cast result object to a boolean. |
boolean | boolWithSideEffects()
Cast result object to a boolean, but allow side effects, such as the
incrementing of an iterator.
|
void | callVisitors(ExpressionOwner owner, XPathVisitor visitor) |
Object | castToType(int t, XPathContext support)
Cast object to type t.
|
static XObject | create(Object val)
Create the right XObject based on the type of the object passed. |
static XObject | create(Object val, XPathContext xctxt)
Create the right XObject based on the type of the object passed.
|
boolean | deepEquals(Expression expr) |
void | destruct()
Forces the object to release it's resources. |
void | detach()
Detaches the DTMIterator from the set which it iterated
over, releasing any computational resources and placing the iterator
in the INVALID state. |
void | dispatchCharactersEvents(ContentHandler ch)
Directly call the
characters method on the passed ContentHandler for the
string-value. |
boolean | equals(XObject obj2)
Tell if two objects are functionally equal.
|
XObject | execute(XPathContext xctxt)
For support of literal objects in xpaths.
|
void | fixupVariables(Vector vars, int globalsSize)
XObjects should not normally need to fix up variables. |
XObject | getFresh()
Get a fresh copy of the object. |
int | getType()
Tell what kind of class this is.
|
String | getTypeString()
Given a request type, return the equivalent string.
|
boolean | greaterThan(XObject obj2)
Tell if one object is greater than the other.
|
boolean | greaterThanOrEqual(XObject obj2)
Tell if one object is greater than or equal to the other.
|
DTMIterator | iter()
Cast result object to a nodelist. |
boolean | lessThan(XObject obj2)
Tell if one object is less than the other.
|
boolean | lessThanOrEqual(XObject obj2)
Tell if one object is less than or equal to the other.
|
NodeSetDTM | mutableNodeset()
Cast result object to a nodelist. |
NodeList | nodelist()
Cast result object to a nodelist. |
NodeIterator | nodeset()
Cast result object to a nodelist. |
boolean | notEquals(XObject obj2)
Tell if two objects are functionally not equal.
|
double | num()
Cast result object to a number. |
double | numWithSideEffects()
Cast result object to a number, but allow side effects, such as the
incrementing of an iterator.
|
Object | object()
Return a java object that's closest to the representation
that should be handed to an extension.
|
void | reset()
Reset for fresh reuse. |
int | rtf(XPathContext support)
Cast result object to a result tree fragment.
|
int | rtf()
For functions to override.
|
DocumentFragment | rtree(XPathContext support)
Cast result object to a result tree fragment.
|
DocumentFragment | rtree()
For functions to override.
|
String | str()
Cast result object to a string.
|
String | toString()
Return the string representation of the object
|
XMLString | xstr()
Cast result object to a string.
|
Parameters: obj Can be any object, should be a specific type for derived classes, or null.
Parameters: allowRelease true if it is OK for detach to release this iterator for pooling.
Returns: The string this wraps or the empty string if null
Returns: false
Throws: javax.xml.transform.TransformerException
Returns: True if there is a next node in the nodeset
See Also: XPathVisitable
Parameters: t Type of object to cast this to support XPath context to use for the conversion
Returns: This object as the given type t
Throws: javax.xml.transform.TransformerException
Parameters: val The java object which this object will wrap.
Returns: the right XObject based on the type of the object passed.
Parameters: val The java object which this object will wrap. xctxt The XPath context.
Returns: the right XObject based on the type of the object passed.
See Also: deepEquals
DTMIterator
from the set which it iterated
over, releasing any computational resources and placing the iterator
in the INVALID state. After detach
has been invoked,
calls to nextNode
or previousNode
will
raise a runtime exception.Parameters: ch A non-null reference to a ContentHandler.
Throws: org.xml.sax.SAXException
Parameters: obj2 Object to compare this to
Returns: True if this object is equal to the given object
Throws: javax.xml.transform.TransformerException
Parameters: xctxt The XPath execution context.
Returns: This object.
Throws: javax.xml.transform.TransformerException
Returns: This object, unless overridden by subclass.
Returns: CLASS_UNKNOWN
Returns: type string "#UNKNOWN" + object class name
Parameters: obj2 Object to compare this to
Returns: True if this object is greater than the given object
Throws: javax.xml.transform.TransformerException
Parameters: obj2 Object to compare this to
Returns: True if this object is greater than or equal to the given object
Throws: javax.xml.transform.TransformerException
Returns: null
Throws: javax.xml.transform.TransformerException
Parameters: obj2 Object to compare this to
Returns: True if this object is less than the given object
Throws: javax.xml.transform.TransformerException
Parameters: obj2 Object to compare this to
Returns: True if this object is less than or equal to the given object
Throws: javax.xml.transform.TransformerException
Returns: The object as a NodeSetDTM.
Throws: javax.xml.transform.TransformerException
Returns: null
Throws: javax.xml.transform.TransformerException
Returns: null
Throws: javax.xml.transform.TransformerException
Parameters: obj2 Object to compare this to
Returns: True if this object is not equal to the given object
Throws: javax.xml.transform.TransformerException
Returns: 0.0
Throws: javax.xml.transform.TransformerException
Returns: numeric value of the string conversion from the next node in the NodeSetDTM, or NAN if no node was found
Returns: The object that this class wraps
Parameters: support XPath context to use for the conversion
Returns: the objec as a result tree fragment.
Returns: null
Parameters: support XPath context to use for the conversion
Returns: the objec as a result tree fragment.
Returns: null
Returns: The object as a string
Returns: the string representation of the object
Returns: The string this wraps or the empty string if null