|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.value.Value
net.sf.saxon.value.AtomicValue
net.sf.saxon.value.AtomicUserDefinedValue
public class AtomicUserDefinedValue
A AtomicUserDefinedValue is an atomic value of a user-defined type
Field Summary | |
---|---|
(package private) AtomicValue |
primitiveValue
|
(package private) AtomicType |
typeLabel
|
Method Summary | |
---|---|
int |
conversionPreference(Class required)
Get conversion preference for this value to a Java class. |
AtomicValue |
convert(int requiredType)
Convert the value to a given type. |
Object |
convertToJava(Class target)
Convert to Java object (for passing to external functions) |
void |
display(int level,
NamePool pool)
Diagnostic print of expression structure. |
boolean |
effectiveBooleanValue(XPathContext context)
Get the effective boolean value of the value |
boolean |
equals(Object obj)
|
Item |
evaluateItem(XPathContext context)
Evaluate the value (this simply returns the value unchanged) |
ItemType |
getItemType()
Determine the data type of the expression, if possible. |
AtomicValue |
getPrimitiveValue()
Get the primitive value (the value in the value space) |
String |
getStringValue()
Evaluate as a string |
int |
hashCode()
|
static AtomicUserDefinedValue |
makeValue(AtomicValue primValue,
AtomicType type,
boolean throwError)
Create a value of a user-defined atomic type |
Methods inherited from class net.sf.saxon.value.AtomicValue |
---|
convert, convert, evaluateAsString, getCardinality, getComponent, getTypedValue, iterate |
Methods inherited from class net.sf.saxon.value.Value |
---|
analyze, asItem, asValue, collapseWhitespace, getDependencies, getSpecialProperties, getSubExpressions, inverse, normalizeWhitespace, promote, simplify, stringToInteger, stringToNumber, trimWhitespace |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.saxon.om.Item |
---|
getTypedValue |
Field Detail |
---|
AtomicValue primitiveValue
AtomicType typeLabel
Method Detail |
---|
public static AtomicUserDefinedValue makeValue(AtomicValue primValue, AtomicType type, boolean throwError) throws XPathException
primValue
- the value in the value space of the primitive typetype
- the required atomic typethrowError
- true if an exception is to be thrown when the value is
invalid (if false, the method returns null instead)
XPathException
- if the value is invalidpublic AtomicValue getPrimitiveValue()
getPrimitiveValue
in class AtomicValue
public AtomicValue convert(int requiredType) throws XPathException
convert
in class AtomicValue
requiredType
- type code of the required atomic type
XPathException
- if conversion is not allowed for this
required type, or if the particular value cannot be convertedpublic Item evaluateItem(XPathContext context) throws XPathException
evaluateItem
in interface Expression
evaluateItem
in class AtomicValue
context
- the evaluation context (not used in this implementation)
XPathException
public String getStringValue() throws XPathException
getStringValue
in interface Item
XPathException
- if the string value cannot be obtained. Some
items have no string value, e.g. a QNamepublic boolean effectiveBooleanValue(XPathContext context)
effectiveBooleanValue
in interface Expression
effectiveBooleanValue
in class AtomicValue
context
- the evaluation context (not used in this implementation)
public int hashCode()
hashCode
in class Object
public Object convertToJava(Class target) throws XPathException
AtomicValue
convertToJava
in class AtomicValue
target
- The class required by the external function
XPathException
public int conversionPreference(Class required)
AtomicValue
conversionPreference
in class AtomicValue
public ItemType getItemType()
Expression
This method should always return a result, though it may be the best approximation that is available at the time.
getItemType
in interface Expression
public void display(int level, NamePool pool)
Expression
display
in interface Expression
level
- indentation level for this expressionpublic boolean equals(Object obj)
equals
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |