Package org.eclipse.sisu.bean
Class BeanPropertySetter<T>
- java.lang.Object
-
- org.eclipse.sisu.bean.BeanPropertySetter<T>
-
- All Implemented Interfaces:
java.security.PrivilegedAction<java.lang.Void>,BeanProperty<T>
final class BeanPropertySetter<T> extends java.lang.Object implements BeanProperty<T>, java.security.PrivilegedAction<java.lang.Void>
BeanPropertybacked by a single-parameter setterMethod.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.Methodmethod
-
Constructor Summary
Constructors Constructor Description BeanPropertySetter(java.lang.reflect.Method method)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object rhs)<A extends java.lang.annotation.Annotation>
AgetAnnotation(java.lang.Class<A> annotationType)Returns the property annotation with the specified type.java.lang.StringgetName()Returns the normalized property name excluding the namespace; for example"address".com.google.inject.TypeLiteral<T>getType()Returns the reified generic type of the property; for exampleTypeLiteral<List<String>>.inthashCode()java.lang.Voidrun()<B> voidset(B bean, T value)Sets the property in the given bean to the given value.java.lang.StringtoString()
-
-
-
Method Detail
-
getAnnotation
public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotationType)
Description copied from interface:BeanPropertyReturns the property annotation with the specified type.- Specified by:
getAnnotationin interfaceBeanProperty<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:BeanPropertyReturns the reified generic type of the property; for exampleTypeLiteral<List<String>>.- Specified by:
getTypein interfaceBeanProperty<T>- Returns:
- Reified generic type
-
getName
public java.lang.String getName()
Description copied from interface:BeanPropertyReturns the normalized property name excluding the namespace; for example"address".- Specified by:
getNamein interfaceBeanProperty<T>- Returns:
- Normalized property name
-
set
public <B> void set(B bean, T value)Description copied from interface:BeanPropertySets the property in the given bean to the given value.- Specified by:
setin interfaceBeanProperty<T>- Parameters:
bean- The bean to updatevalue- The value to set
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object rhs)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
run
public java.lang.Void run()
- Specified by:
runin interfacejava.security.PrivilegedAction<T>
-
-