|
|||||||||
| Home >> All >> org >> apache >> commons >> jxpath >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.commons.jxpath.util
Class BasicTypeConverter

java.lang.Objectorg.apache.commons.jxpath.util.BasicTypeConverter
- All Implemented Interfaces:
- TypeConverter
- public class BasicTypeConverter
- extends java.lang.Object
- implements TypeConverter
- extends java.lang.Object
The default implementation of TypeConverter.
- Version:
- $Revision: 1.15 $ $Date: 2004/07/25 13:16:04 $
| Nested Class Summary | |
(package private) static class |
BasicTypeConverter.ValueNodeSet
|
(package private) static class |
BasicTypeConverter.ValuePointer
|
| Constructor Summary | |
BasicTypeConverter()
|
|
| Method Summary | |
protected java.util.Collection |
allocateCollection(java.lang.Class type)
|
protected java.lang.Number |
allocateNumber(java.lang.Class type,
double value)
|
boolean |
canConvert(java.lang.Object object,
java.lang.Class toType)
Returns true if it can convert the supplied object to the specified class. |
protected boolean |
canCreateCollection(java.lang.Class type)
|
java.lang.Object |
convert(java.lang.Object object,
java.lang.Class toType)
Converts the supplied object to the specified type. |
protected java.lang.Object |
convertNullToPrimitive(java.lang.Class toType)
|
protected java.lang.Object |
convertStringToPrimitive(java.lang.Object object,
java.lang.Class toType)
|
protected java.util.Collection |
unmodifiableCollection(java.util.Collection collection)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
BasicTypeConverter
public BasicTypeConverter()
| Method Detail |
canConvert
public boolean canConvert(java.lang.Object object, java.lang.Class toType)
- Returns true if it can convert the supplied
object to the specified class.
- Specified by:
canConvertin interfaceTypeConverter
convert
public java.lang.Object convert(java.lang.Object object, java.lang.Class toType)
- Converts the supplied object to the specified
type. Throws a runtime exception if the conversion is
not possible.
- Specified by:
convertin interfaceTypeConverter
convertNullToPrimitive
protected java.lang.Object convertNullToPrimitive(java.lang.Class toType)
convertStringToPrimitive
protected java.lang.Object convertStringToPrimitive(java.lang.Object object, java.lang.Class toType)
allocateNumber
protected java.lang.Number allocateNumber(java.lang.Class type, double value)
canCreateCollection
protected boolean canCreateCollection(java.lang.Class type)
allocateCollection
protected java.util.Collection allocateCollection(java.lang.Class type)
unmodifiableCollection
protected java.util.Collection unmodifiableCollection(java.util.Collection collection)
|
|||||||||
| Home >> All >> org >> apache >> commons >> jxpath >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.commons.jxpath.util.BasicTypeConverter