Class BeanProperty

java.lang.Object
jadex.common.transformation.traverser.BeanProperty

public class BeanProperty extends Object
This class is a struct for saving data about an inspected bean property.
  • Field Details

    • name

      protected String name
      The name.
    • type

      protected Class<?> type
      The type.
    • getter

      protected Method getter
      The getter.
    • getterhandle

      protected MethodHandle getterhandle
      The getter handle access.
    • staticgetterhandle

      protected MethodHandle staticgetterhandle
      The static getter handle access.
    • setter

      protected Method setter
      The setter.
    • setterhandle

      protected MethodHandle setterhandle
      The setter handle access.
    • staticsetterhandle

      protected MethodHandle staticsetterhandle
      The static getter handle access.
    • readable

      protected boolean readable
      Readable flag
    • writable

      protected boolean writable
      Writable flag
    • settertype

      protected Class<?> settertype
      The setter type.
    • field

      protected Field field
      The field.
    • gentype

      protected Type gentype
      The generic type.
  • Constructor Details

    • BeanProperty

      public BeanProperty()
      Create a new bean property.
    • BeanProperty

      public BeanProperty(String name, Class<?> type, Method getter, Method setter, Class<?> settertype, boolean readable, boolean writable, Type gentype)
      Create a new bean property.
    • BeanProperty

      public BeanProperty(String name, Field field)
      Create a new bean property.
  • Method Details

    • getName

      public String getName()
      Get the name.
      Returns:
      The name.
    • setName

      public void setName(String name)
      Set the name.
      Parameters:
      name - The name to set.
    • getType

      public Class<?> getType()
      Get the type.
      Returns:
      The type.
    • setType

      public void setType(Class<?> type)
      Set the type.
      Parameters:
      type - The type to set.
    • getGetter

      public Method getGetter()
      Get the getter.
      Returns:
      The getter.
    • setGetter

      public void setGetter(Method getter)
      Set the getter.
      Parameters:
      getter - The getter to set.
    • getSetter

      public Method getSetter()
      Get the setter.
      Returns:
      The setter.
    • setSetter

      public void setSetter(Method setter)
      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

      public Class<?> getSetterType()
      Get the setter_type.
      Returns:
      The setterttype.
    • setSetterType

      public void setSetterType(Class<?> settertype)
      Set the setter type.
      Parameters:
      settertype - The setter type to set.
    • getField

      public Field getField()
      Get the field.
      Returns:
      The field.
    • setField

      public void setField(Field field)
      Set the field.
      Parameters:
      field - The field to set.
    • getGenericType

      public Type getGenericType()
      Get the gentype.
      Returns:
      The gentype
    • setGenericType

      public void setGenericType(Type gentype)
      Set the gentype.
      Parameters:
      gentype - The gentype to set
    • getPropertyValue

      public Object getPropertyValue(Object object)
      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

      public void setPropertyValue(Object object, Object value)
      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.