Class BeanProperty
java.lang.Object
jadex.common.transformation.traverser.BeanProperty
This class is a struct for saving data about an inspected bean property.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Field
The field.protected Type
The generic type.protected Method
The getter.protected MethodHandle
The getter handle access.protected String
The name.protected boolean
Readable flagprotected Method
The setter.protected MethodHandle
The setter handle access.protected Class
<?> The setter type.protected MethodHandle
The static getter handle access.protected MethodHandle
The static getter handle access.protected Class
<?> The type.protected boolean
Writable flag -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new bean property.BeanProperty
(String name, Class<?> type, Method getter, Method setter, Class<?> settertype, boolean readable, boolean writable, Type gentype) Create a new bean property.BeanProperty
(String name, Field field) Create a new bean property. -
Method Summary
Modifier and TypeMethodDescriptiongetField()
Get the field.Get the gentype.Get the getter.getName()
Get the name.getPropertyValue
(Object object) Retrieves the bean property value for the given object.Get the setter.Class
<?> Get the setter_type.Class
<?> getType()
Get the type.boolean
Tests if the property is readable.boolean
Tests if the property is writable.void
Set the field.void
setGenericType
(Type gentype) Set the gentype.void
Set the getter.void
Set the name.void
setPropertyValue
(Object object, Object value) Sets the bean property value for the given object.void
Set the setter.void
setSetterType
(Class<?> settertype) Set the setter type.void
Set the type.
-
Field Details
-
name
The name. -
type
The type. -
getter
The getter. -
getterhandle
The getter handle access. -
staticgetterhandle
The static getter handle access. -
setter
The setter. -
setterhandle
The setter handle access. -
staticsetterhandle
The static getter handle access. -
readable
protected boolean readableReadable flag -
writable
protected boolean writableWritable flag -
settertype
The setter type. -
field
The field. -
gentype
The generic type.
-
-
Constructor Details
-
Method Details
-
getName
Get the name.- Returns:
- The name.
-
setName
Set the name.- Parameters:
name
- The name to set.
-
getType
Get the type.- Returns:
- The type.
-
setType
Set the type.- Parameters:
type
- The type to set.
-
getGetter
Get the getter.- Returns:
- The getter.
-
setGetter
Set the getter.- Parameters:
getter
- The getter to set.
-
getSetter
Get the setter.- Returns:
- The setter.
-
setSetter
Set the setter.- Parameters:
setter
- The setter to set.
-
isWritable
public boolean isWritable()Tests if the property is writable.- Returns:
- True, if the property is writable.
-
isReadable
public boolean isReadable()Tests if the property is readable.- Returns:
- True, if the property is readable.
-
getSetterType
Get the setter_type.- Returns:
- The setterttype.
-
setSetterType
Set the setter type.- Parameters:
settertype
- The setter type to set.
-
getField
Get the field.- Returns:
- The field.
-
setField
Set the field.- Parameters:
field
- The field to set.
-
getGenericType
Get the gentype.- Returns:
- The gentype
-
setGenericType
Set the gentype.- Parameters:
gentype
- The gentype to set
-
getPropertyValue
Retrieves the bean property value for the given object.- Parameters:
object
- The object containing the bean property.property
- The name of the property.- Returns:
- The value of the bean property.
-
setPropertyValue
Sets the bean property value for the given object.- Parameters:
object
- The object containing the bean property.value
- The new value.property
- The name of the property.
-