|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.xsl.extensions.JavaObject
A wrapper class for a generic java Object, permitting the Object to be used in XPath expressions.
Field Summary |
Fields inherited from interface com.novell.xml.xpath.ExpressionValue |
BOOLEAN, EXTENDED, NATIVE, NODE_SET, NUMBER, STRING |
Constructor Summary | |
JavaObject()
Construct a null JavaObject |
|
JavaObject(Object object)
Construct a JavaObject that wraps the passed object. |
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 |
static Class |
getArgType()
Return the Class object for objects of this type. |
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. |
Object |
getObject()
Return the underlying java Object |
String |
getStringValue()
Return string value of this ExpressionValue. |
int |
getValueType()
Return type of expression value |
Class |
getWrappedType()
Return the Class of the wrapped object This will not be valid if either object is null, or set wrapped type has not been called. |
void |
setWrappedType(Class wrappedType)
Set the wrapped object Class, if there is no current wrapped object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JavaObject(Object object)
object
- The object to wrap.public JavaObject()
Method Detail |
public static Class getArgType()
public Object getObject()
public Class getWrappedType()
public void setWrappedType(Class wrappedType)
wrappedType
- The Class of the intended wrapped objectpublic int getValueType()
getValueType
in interface ExpressionValue
public void castFrom(Object type) throws XPathConversionException
castFrom
in interface ExpressionValue
type
- The object to convert from.
XPathConversionException
public boolean getBooleanValue() throws XPathConversionException
getBooleanValue
in interface ExpressionValue
XPathConversionException
public double getNumberValue() throws XPathConversionException
getNumberValue
in interface ExpressionValue
XPathConversionException
public String getStringValue()
getStringValue
in interface ExpressionValue
public NodeSet getNodeSetValue() throws XPathConversionException
getNodeSetValue
in interface ExpressionValue
XPathConversionException
public Object getNativeValue()
getNativeValue
in interface ExpressionValue
public void dump(PrintWriter writer)
dump
in interface ExpressionValue
writer
- Output device
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |