|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.convert.AbstractConverter<S,T>
public abstract class AbstractConverter<S,T>
Abstract converter class. This class handles converter registration
and it implements some of the Converter
methods.
Constructor Summary | |
---|---|
protected |
AbstractConverter(Class<? super S> sourceClass,
Class<? super T> targetClass)
|
Method Summary | |
---|---|
boolean |
canConvert(Class<?> sourceClass,
Class<?> targetClass)
Returns true if this object can convert
sourceClass to targetClass . |
Class<? super S> |
getSourceClass()
Returns the source Class for this converter. |
Class<? super T> |
getTargetClass()
Returns the target Class for this converter. |
void |
loadConverters()
Create and register converters with the Java object type conversion framework. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.commons.convert.Converter |
---|
convert |
Constructor Detail |
---|
protected AbstractConverter(Class<? super S> sourceClass, Class<? super T> targetClass)
Method Detail |
---|
public void loadConverters()
ConverterLoader
Converters.registerConverter(Converter)
with the Converter
instance.
loadConverters
in interface ConverterLoader
public boolean canConvert(Class<?> sourceClass, Class<?> targetClass)
Converter
true
if this object can convert
sourceClass
to targetClass
.
Implementations can accomodate class hierarchy ranges by converting super classes or interfaces.
canConvert
in interface Converter<S,T>
sourceClass
- The source Class
targetClass
- The target Class
true
if this object can convert
sourceClass
to targetClass
.public Class<? super S> getSourceClass()
Converter
Class
for this converter.
getSourceClass
in interface Converter<S,T>
Class
for this converterpublic Class<? super T> getTargetClass()
Converter
Class
for this converter.
getTargetClass
in interface Converter<S,T>
Class
for this converter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |