T - type of mapped java class@Api public interface Type<T>
| Modifier and Type | Method and Description |
|---|---|
T |
convert(String value)
Returns string value converted to Object of this type
|
boolean |
isInstance(Class<?> clazz)
Checks if given class instances will be considered an instance of this type
isInstance(Object). |
boolean |
isInstance(Object value)
Checks if given value is instance of this type.
|
Class<T> |
javaType()
Returns Java
Class that represents value of this type. |
String |
name()
Returns unqiue type name.
|
T |
read(Object value)
Reads given value as this type base java type
javaType(). |
<I,O> O |
readAs(I value,
Class<O> type)
Reads given value as specified type instance.
|
String name()
boolean isInstance(Object value)
value - any valueboolean isInstance(Class<?> clazz)
isInstance(Object).clazz - classT read(Object value)
javaType(). Specified value must be
an instance of this type (isInstance(Object)).value - any value that is instance of this typejavaType() classT convert(String value)
value - to convert<I,O> O readAs(I value,
Class<O> type)
isInstance(Class) requirements.value - valuetype - output typeCopyright © 2020 Suncode. All rights reserved.