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 FieldThe field.protected TypeThe generic type.protected MethodThe getter.protected MethodHandleThe getter handle access.protected StringThe name.protected booleanReadable flagprotected MethodThe setter.protected MethodHandleThe setter handle access.protected Class<?>The setter type.protected MethodHandleThe static getter handle access.protected MethodHandleThe static getter handle access.protected Class<?>The type.protected booleanWritable 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.booleanTests if the property is readable.booleanTests if the property is writable.voidSet the field.voidsetGenericType(Type gentype) Set the gentype.voidSet the getter.voidSet the name.voidsetPropertyValue(Object object, Object value) Sets the bean property value for the given object.voidSet the setter.voidsetSetterType(Class<?> settertype) Set the setter type.voidSet 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.property- The name of the property.value- The new value.
-