public class StringBinderAdapter extends Object implements StringBinder
Constructor and Description |
---|
StringBinderAdapter(ConversionBinder binder) |
Modifier and Type | Method and Description |
---|---|
<T> T |
convertFromString(Class<T> output,
String object)
Convert a String to the given target class
|
<T> T |
convertFromString(Class<T> output,
String object,
Class<? extends Annotation> qualifier)
Convert a String to the given target class
|
<S> String |
convertToString(Class<S> input,
Object object)
Convert an object which is an instance of source class to String
|
<S> String |
convertToString(Class<S> input,
Object object,
Class<? extends Annotation> qualifier)
Convert an object which is an instance of source class to String
|
String |
convertToString(Object object)
Convert an object to String
This method infers the source type for the conversion from the runtime type of object.
|
String |
convertToString(Object object,
Class<? extends Annotation> qualifier)
Convert an object to String
This method infers the source type for the conversion from the runtime type of object.
|
ConversionBinder |
getAssociatedBinder() |
public StringBinderAdapter(ConversionBinder binder)
public <T> T convertFromString(Class<T> output, String object)
convertFromString
in interface StringBinder
T
- The type of the target classoutput
- The target class to convert the object toobject
- The String to be convertedpublic <T> T convertFromString(Class<T> output, String object, Class<? extends Annotation> qualifier)
convertFromString
in interface StringBinder
T
- The type of the target classoutput
- The target class to convert the object toobject
- The String to be convertedqualifier
- The qualifier for which the binding must be registeredpublic String convertToString(Object object)
convertToString
in interface StringBinder
object
- The object to be convertedpublic String convertToString(Object object, Class<? extends Annotation> qualifier)
convertToString
in interface StringBinder
object
- The object to be convertedqualifier
- The qualifier for which the binding must be registeredpublic <S> String convertToString(Class<S> input, Object object)
convertToString
in interface StringBinder
S
- The type of the input classinput
- The class of the object to be convertedobject
- The object to be convertedpublic <S> String convertToString(Class<S> input, Object object, Class<? extends Annotation> qualifier)
convertToString
in interface StringBinder
S
- The type of the input classinput
- The class of the object to be convertedobject
- The object to be convertedqualifier
- Match the converter with the given qualifierpublic ConversionBinder getAssociatedBinder()
Copyright © 2010–2018 Jadira Systems. All rights reserved.