Package org.eclipse.sisu.bean
Interface BeanProperty<T>
public interface BeanProperty<T>
Represents a bean property such as a field or setter method.
// like...
@SomeAnnotation
SomeType someProperty;
// ...or...
@SomeAnnotation
void setSomeProperty( SomeType _someProperty )
{
// ...etc...
}
-
Method Summary
Modifier and TypeMethodDescription<A extends Annotation>
AgetAnnotation(Class<A> annotationType) Returns the property annotation with the specified type.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 exampleTypeLiteral<List<String>>.<B> voidSets the property in the given bean to the given value.
-
Method Details
-
getAnnotation
Returns the property annotation with the specified type.- Parameters:
annotationType- The annotation type- Returns:
- Property annotation if it exists; otherwise
null
-
getType
com.google.inject.TypeLiteral<T> getType()Returns the reified generic type of the property; for exampleTypeLiteral<List<String>>.- Returns:
- Reified generic type
-
getName
String getName()Returns the normalized property name excluding the namespace; for example"address".- Returns:
- Normalized property name
-
set
Sets the property in the given bean to the given value.- Parameters:
bean- The bean to updatevalue- The value to set
-