T - type of data modelpublic interface DataModelDefinition<T>
| Modifier and Type | Interface and Description |
|---|---|
static class |
DataModelDefinition.Builder<T>
Builds a
DataModelReflection. |
| Modifier and Type | Method and Description |
|---|---|
<A extends Annotation> |
getAnnotation(Class<A> annotationType)
Returns this element's annotation for the specified annotation type.
|
<A extends Annotation> |
getAnnotation(PropertyName name,
Class<A> annotationType)
Returns the property's annotation for the specified annotation type.
|
Class<T> |
getModelClass()
Returns the corresponded data model class.
|
Collection<PropertyName> |
getProperties()
returns the all public property names.
|
PropertyType |
getType(PropertyName name)
Returns the property type.
|
DataModelDefinition.Builder<T> |
newReflection()
Starts to build a new
DataModelReflection. |
default Object |
resolveRawValue(Object value)
Converts the given raw property value into a corresponded property value for
DataModelReflection. |
T |
toObject(DataModelReflection reflection)
Converts a generic reflection model into a target object.
|
DataModelReflection |
toReflection(T object)
Converts a target object into a generic reflection model.
|
Class<T> getModelClass()
<A extends Annotation> A getAnnotation(Class<A> annotationType)
A - type of annotationannotationType - class of annotationnull if does not presentIllegalArgumentException - if some parameters were nullCollection<PropertyName> getProperties()
PropertyType getType(PropertyName name)
name - the property namenull if no such property existsIllegalArgumentException - if some parameters were null<A extends Annotation> A getAnnotation(PropertyName name, Class<A> annotationType)
A - type of annotationname - target propertyannotationType - class of annotationnull if neither the property nor its specified annotation do not presentIllegalArgumentException - if some parameters were nullDataModelDefinition.Builder<T> newReflection()
DataModelReflection.DataModelReflection toReflection(T object)
object - target objectIllegalArgumentException - if some parameters were nullT toObject(DataModelReflection reflection)
reflection - a reflection modelIllegalArgumentException - if some parameters were nulldefault Object resolveRawValue(Object value)
DataModelReflection.value - the raw property valueCopyright © 2011–2018 Asakusa Framework Team. All rights reserved.