kiss
Model
<M
>
M
>M
Model
is the advanced representation of Class
in Sinobu.type
ClassM
M
atomic
boolean
Whether this Model
is an atomic type or object type.
decoder
DecoderM
M
The associated decoder.
encoder
EncoderM
M
The associated encoder.
properties
()
CollectionProperty
Property
Collection |
List up all properties.
property
(String
name
)
Property
String
name
)String name |
A name of property. |
Property |
A suitable property or |
Find the property which has the specified name in this object model. If the suitable property
is not found, null
is returned.
get
(M
object
, Property
property
)
Object
M
object
, Property
property
)M object |
An object as source. This value must not be |
Property property |
A property. This value must not be |
Object |
A resolved property value. This value may be |
Returns the value of the given property in the given object.
set
(M
object
, Property
property
, Object
value
)
M
M
object
, Property
property
, Object
value
)M object |
An object as source. This value must not be |
Property property |
A property. This value must not be |
Object value |
A new property value that you want to set. This value accepts |
M |
Change the given property in the given object to the given new property value.
observe
(M
object
, Property
property
)
Signal
M
object
, Property
property
)M object |
An object as source. This value must not be |
Property property |
A property. This value must not be |
Signal |
A property observer. |
Observe the given property in the given object.
walk
(M
object
, WiseTriConsumerModelM
, Property
, Object
walker
)
void
M
object
, WiseTriConsumerModelM
, Property
, Object
walker
)M object |
An object as source. This value must not be |
WiseTriConsumer walker |
A property iterator. This value accepts |
Iterate over all properties in the given object and propagate the property, and it's value to the given property walker.
of
(M
modelType
)
ModelM
M
modelType
)M
M |
|
M modelType |
A model class. |
Model |
The information about the given model class. |
Utility method to retrieve the cached model. If the model of the given class is not found,
IllegalArgumentException
will be thrown.
If the given model has no cached information, it will be created automatically. This operation is thread-safe.
Note : All classes do not necessary have each information. Some classes might share same
Model
object. (e.g. AutoGenerated Class)
of
(Class?
M
modelClass
)
ModelM
Class?
M
modelClass
)M
M |
|
Class modelClass |
A model class. |
Model |
The information about the given model class. |
Utility method to retrieve the cached model. If the model of the given class is not found,
IllegalArgumentException
will be thrown.
If the given model has no cached information, it will be created automatically. This operation is thread-safe.
Note : All classes do not necessary have each information. Some classes might share same
Model
object. (e.g. AutoGenerated Class)
collectAnnotatedMethods
(Class
clazz
)
MapMethod
, ListAnnotation
Class
clazz
)Method
, ListAnnotation
Class clazz |
A target class. |
Map |
A table of method and annotations. |
Collect all annotated methods and their annotations.
collectConstructors
(ClassT
clazz
)
ConstructorT
ClassT
clazz
)T
T |
A class type. |
Class clazz |
A target class. |
Constructor |
A collected constructors. |
Collect all constructors which are defined in the specified Class
. If the given class
is interface, primitive types, array class or void
, empty array
will be return.
collectTypes
(Class
clazz
)
SetClass
Class
clazz
)Class
Class clazz |
A target class. |
Set |
A set of classes, with predictable bottom-up iteration order. |
Collect all classes which are extended or implemented by the target class.
collectParameters
(Type
type
, GenericDeclaration
target
)
Type
Type
type
, GenericDeclaration
target
)Type type |
A class type which implements(extends) the specified target interface(class).
|
GenericDeclaration target |
A target type to list up types. |
Type |
A list of actual types. |
List up all target types which are implemented or extended by the specified class.