|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.commons.jxpath.util.BasicTypeConverter
public class BasicTypeConverter
The default implementation of TypeConverter.
| Constructor Summary | |
|---|---|
BasicTypeConverter()
|
|
| Method Summary | |
|---|---|
protected java.util.Collection |
allocateCollection(java.lang.Class type)
Create a collection of a given type. |
protected java.lang.Number |
allocateNumber(java.lang.Class type,
double value)
Allocate a number of a given type and 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)
Learn whether this BasicTypeConverter can create a collection of the specified 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)
Convert null to a primitive type. |
protected java.lang.Object |
convertStringToPrimitive(java.lang.Object object,
java.lang.Class toType)
Convert a string to a primitive type. |
protected java.util.Collection |
unmodifiableCollection(java.util.Collection collection)
Get an unmodifiable version of a collection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicTypeConverter()
| Method Detail |
|---|
public boolean canConvert(java.lang.Object object,
java.lang.Class toType)
canConvert in interface TypeConverterobject - to checktoType - prospective destination class
public java.lang.Object convert(java.lang.Object object,
java.lang.Class toType)
convert in interface TypeConverterobject - to converttoType - destination class
protected java.lang.Object convertNullToPrimitive(java.lang.Class toType)
toType - destination class
protected java.lang.Object convertStringToPrimitive(java.lang.Object object,
java.lang.Class toType)
object - StringtoType - destination class
protected java.lang.Number allocateNumber(java.lang.Class type,
double value)
type - destination classvalue - double
protected boolean canCreateCollection(java.lang.Class type)
type - prospective destination class
protected java.util.Collection allocateCollection(java.lang.Class type)
type - destination class
protected java.util.Collection unmodifiableCollection(java.util.Collection collection)
collection - to wrap
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||