public interface Element extends java.lang.reflect.AnnotatedElement, Result<ValueHandler,java.lang.Object>, ValueHandler
Modifier and Type | Method and Description |
---|---|
java.lang.Class |
declaringClass() |
ValueHandler |
in(java.lang.Object target)
Handles this element on the given target (if applies).
|
boolean |
isReadable() |
boolean |
isSpecific()
Checks if this element is specific for a target.
|
boolean |
isWritable() |
java.lang.String |
name() |
void |
set(java.lang.Object value)
Sets the value if this element is
specific . |
<E> E |
target()
Returns the target for this element in case of a
specific one. |
java.lang.Class |
type() |
<E> E |
value()
Returns the value if this element is
specific . |
java.lang.Class declaringClass()
java.lang.String name()
java.lang.Class type()
boolean isReadable()
true
if the value of this element can be read.boolean isWritable()
true
if the value of this element can be change.ValueHandler in(java.lang.Object target)
This method may throw exceptions in case of the element cannot be handled or an error occurring while handling the element.
in
in interface Result<ValueHandler,java.lang.Object>
target
- the target that contains this element.boolean isSpecific()
true
, then the methods value()
and
set(Object)
can be used.true
if this element is specific for a target.<E> E target()
specific
one.specific
or null
if not.<E> E value() throws HandlingException
specific
.value
in interface ValueHandler
HandlingException
- if anything go wrong.void set(java.lang.Object value) throws HandlingException
specific
.set
in interface ValueHandler
value
- the value to set.HandlingException
- if anything go wrong