Class BeanPropertyField<T>

java.lang.Object
org.eclipse.sisu.bean.BeanPropertyField<T>
All Implemented Interfaces:
PrivilegedAction<Void>, BeanProperty<T>

final class BeanPropertyField<T> extends Object implements BeanProperty<T>, PrivilegedAction<Void>
BeanProperty backed by a Field.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Field
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    <A extends Annotation>
    A
    getAnnotation(Class<A> annotationType)
    Returns the property annotation with the specified type.
    Returns the normalized property name excluding the namespace; for example "address".
    com.google.inject.TypeLiteral<T>
    Returns the reified generic type of the property; for example TypeLiteral<List<String>>.
    int
     
    run()
     
    <B> void
    set(B bean, T value)
    Sets the property in the given bean to the given value.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • field

      private final Field field
  • Constructor Details

    • BeanPropertyField

      BeanPropertyField(Field field)
  • Method Details

    • getAnnotation

      public <A extends Annotation> A getAnnotation(Class<A> annotationType)
      Description copied from interface: BeanProperty
      Returns the property annotation with the specified type.
      Specified by:
      getAnnotation in interface BeanProperty<T>
      Parameters:
      annotationType - The annotation type
      Returns:
      Property annotation if it exists; otherwise null
    • getType

      public com.google.inject.TypeLiteral<T> getType()
      Description copied from interface: BeanProperty
      Returns the reified generic type of the property; for example TypeLiteral<List<String>>.
      Specified by:
      getType in interface BeanProperty<T>
      Returns:
      Reified generic type
    • getName

      public String getName()
      Description copied from interface: BeanProperty
      Returns the normalized property name excluding the namespace; for example "address".
      Specified by:
      getName in interface BeanProperty<T>
      Returns:
      Normalized property name
    • set

      public <B> void set(B bean, T value)
      Description copied from interface: BeanProperty
      Sets the property in the given bean to the given value.
      Specified by:
      set in interface BeanProperty<T>
      Parameters:
      bean - The bean to update
      value - The value to set
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object rhs)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • run

      public Void run()
      Specified by:
      run in interface PrivilegedAction<T>