|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ExpressionValue
Interface allowing discovery of and access to expression values. Implementing classes must provide an argumentless constructor for use in casting expression types. For casting, the appropriate type is constructed, then the castFrom() member defined by this interface is called.
Field Summary | |
---|---|
static int |
BOOLEAN
Represents a boolean value |
static int |
EXTENDED
Represents a non-XPath defined type |
static int |
NATIVE
Represents a native (extension) type |
static int |
NODE_SET
Represents a node-set value |
static int |
NUMBER
Represents a number value |
static int |
STRING
Represents a string value |
Method Summary | |
---|---|
void |
castFrom(Object type)
Convert from a different type of expression value to the type of the class implementing the ExpressionValue interface. |
void |
dump(PrintWriter writer)
Output a human-readable form for the value |
boolean |
getBooleanValue()
Return boolean value of expression value (will convert to boolean if value is not of type boolean) |
Object |
getNativeValue()
return the underlying native value (java.lang.Boolean, java.lang.Double, etc.) |
NodeSet |
getNodeSetValue()
Return node-set value of this ExpressionValue. |
double |
getNumberValue()
Return numeric value of ExpressionValue. |
String |
getStringValue()
Return string value of this ExpressionValue. |
int |
getValueType()
Return type of expression value |
Field Detail |
---|
static final int BOOLEAN
static final int NUMBER
static final int STRING
static final int NODE_SET
static final int EXTENDED
static final int NATIVE
Method Detail |
---|
int getValueType()
void castFrom(Object type) throws XPathConversionException
type
- The object to convert from.
XPathConversionException
boolean getBooleanValue() throws XPathConversionException
XPathConversionException
double getNumberValue() throws XPathConversionException
XPathConversionException
String getStringValue()
NodeSet getNodeSetValue() throws XPathConversionException
XPathConversionException
Object getNativeValue()
void dump(PrintWriter writer)
writer
- Output device
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |