final class BeanPropertySetter<T> extends java.lang.Object implements BeanProperty<T>, java.security.PrivilegedAction<java.lang.Void>
BeanProperty
backed by a single-parameter setter Method
.Modifier and Type | Field and Description |
---|---|
private java.lang.reflect.Method |
method |
Constructor and Description |
---|
BeanPropertySetter(java.lang.reflect.Method method) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object rhs) |
<A extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.Class<A> annotationType)
Returns the property annotation with the specified type.
|
java.lang.String |
getName()
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 example
TypeLiteral<List<String>> . |
int |
hashCode() |
java.lang.Void |
run() |
<B> void |
set(B bean,
T value)
Sets the property in the given bean to the given value.
|
java.lang.String |
toString() |
public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotationType)
BeanProperty
getAnnotation
in interface BeanProperty<T>
annotationType
- The annotation typenull
public com.google.inject.TypeLiteral<T> getType()
BeanProperty
TypeLiteral<List<String>>
.getType
in interface BeanProperty<T>
public java.lang.String getName()
BeanProperty
"address"
.getName
in interface BeanProperty<T>
public <B> void set(B bean, T value)
BeanProperty
set
in interface BeanProperty<T>
bean
- The bean to updatevalue
- The value to setpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object rhs)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Void run()
run
in interface java.security.PrivilegedAction<java.lang.Void>