APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xpath.internal.jaxp

pack-priv Class XPathResultImpl<T>

extends Object
implements XPathEvaluationResult<T>
Class Inheritance
All Implemented Interfaces
javax.xml.xpath.XPathEvaluationResult
Imports
com.sun.org.apache.xpath.internal.objects.XObject, java.util.Objects, javax.xml.transform.TransformerException, javax.xml.xpath.XPathNodes, .XPathEvaluationResult, .XPathEvaluationResult.XPathResultType, org.w3c.dom.Node, .NodeList, org.w3c.dom.traversal.NodeIterator

This is the implementation of XPathEvaluationResult that represents the result of the evaluation of an XPath expression within the context of a particular node.

Field Summary

Modifier and TypeField and Description
pack-priv boolean
pack-priv int
pack-priv Node
pack-priv XPathEvaluationResult.XPathResultType
pack-priv Node
pack-priv NodeList
pack-priv double
pack-priv XObject
pack-priv int
pack-priv String
pack-priv Class<T>

Constructor Summary

AccessConstructor and Description
public
XPathResultImpl(XObject
internal XPath result object
resultObject
,
Class<T>
class type
type
)

Construct an XPathEvaluationResult object.

Method Summary

Modifier and TypeMethod and Description
pack-priv static <
The expected class type.
T
>
int

Returns:

the internal XObject type.
classToInternalType
(Class<T>
the class type
type
)

Map the specified class type to the internal result type

private void
getResult(XObject
internal XPath result object
resultObject
)

Read the XObject and set values in accordance with the result type

pack-priv static <
The expected class type.
T
>
T

Returns:

The value of the result, null in case of unexpected type.
getValue
(XObject
internal XPath result object
resultObject
,
Class<T>
the class type
type
)

Read the internal result object and return the value in accordance with the type specified.

public XPathEvaluationResult.XPathResultType

Returns:

the result type
type
()

Implements javax.xml.xpath.XPathEvaluationResult.type.

Return the result type as an enum specified by XPathResultType

public T

Returns:

The value of the result.
value
()

Implements javax.xml.xpath.XPathEvaluationResult.value.

Returns the value of the result as the type <T> specified for the class.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

boolValueback to summary
pack-priv boolean boolValue
currentIndexback to summary
pack-priv int currentIndex
currentNodeback to summary
pack-priv Node currentNode
mapToTypeback to summary
pack-priv XPathEvaluationResult.XPathResultType mapToType
nodeback to summary
pack-priv Node node
nodeListback to summary
pack-priv NodeList nodeList
numValueback to summary
pack-priv double numValue
resultObjectback to summary
pack-priv XObject resultObject
resultTypeback to summary
pack-priv int resultType
strValueback to summary
pack-priv String strValue
typeback to summary
pack-priv Class<T> type

Constructor Detail

XPathResultImplback to summary
public XPathResultImpl(XObject resultObject, Class<T> type) throws TransformerException

Construct an XPathEvaluationResult object.

Parameters
resultObject:XObject

internal XPath result object

type:Class<T>

class type

Exceptions
TransformerException:
if there is an error reading the XPath result.

Method Detail

classToInternalTypeback to summary
pack-priv static <T> int classToInternalType(Class<T> type)

Map the specified class type to the internal result type

Parameters
<T>
The expected class type.
type:Class<T>

the class type

Returns:int

the internal XObject type.

getResultback to summary
private void getResult(XObject resultObject) throws TransformerException

Read the XObject and set values in accordance with the result type

Parameters
resultObject:XObject

internal XPath result object

Exceptions
TransformerException:
if there is an error reading the XPath result.
getValueback to summary
pack-priv static <T> T getValue(XObject resultObject, Class<T> type) throws TransformerException

Read the internal result object and return the value in accordance with the type specified.

Parameters
<T>
The expected class type.
resultObject:XObject

internal XPath result object

type:Class<T>

the class type

Returns:T

The value of the result, null in case of unexpected type.

Exceptions
TransformerException:
if there is an error reading the XPath result.
typeback to summary
public XPathEvaluationResult.XPathResultType type()

Implements javax.xml.xpath.XPathEvaluationResult.type.

Return the result type as an enum specified by XPathResultType

Returns:XPathEvaluationResult.XPathResultType

the result type

Annotations
@Override
valueback to summary
public T value()

Implements javax.xml.xpath.XPathEvaluationResult.value.

Returns the value of the result as the type <T> specified for the class.

Returns:T

The value of the result.

Annotations
@Override