|
||||||||||
| 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 Collection |
allocateCollection(Class type)
Create a collection of a given type. |
protected Number |
allocateNumber(Class type,
double value)
Allocate a number of a given type and value. |
boolean |
canConvert(Object object,
Class toType)
Returns true if it can convert the supplied object to the specified class. |
protected boolean |
canCreateCollection(Class type)
Learn whether this BasicTypeConverter can create a collection of the specified type. |
Object |
convert(Object object,
Class toType)
Converts the supplied object to the specified type. |
protected Object |
convertNullToPrimitive(Class toType)
Convert null to a primitive type. |
protected Object |
convertStringToPrimitive(Object object,
Class toType)
Convert a string to a primitive type. |
protected Collection |
unmodifiableCollection(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(Object object,
Class toType)
canConvert in interface TypeConverterobject - to checktoType - prospective destination class
public Object convert(Object object,
Class toType)
convert in interface TypeConverterobject - to converttoType - destination class
protected Object convertNullToPrimitive(Class toType)
toType - destination class
protected Object convertStringToPrimitive(Object object,
Class toType)
object - StringtoType - destination class
protected Number allocateNumber(Class type,
double value)
type - destination classvalue - double
protected boolean canCreateCollection(Class type)
type - prospective destination class
protected Collection allocateCollection(Class type)
type - destination class
protected Collection unmodifiableCollection(Collection collection)
collection - to wrap
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||