Package org.dellroad.stuff.vaadin8
Class ProvidesPropertyScanner<T>
- java.lang.Object
-
- org.dellroad.stuff.vaadin8.ProvidesPropertyScanner<T>
-
- Type Parameters:
T- Java class to be introspected
public class ProvidesPropertyScanner<T> extends Object
Scans a Java class hierarchy for@ProvidesPropertyannotated getter methods and creates a correspondingPropertySetcontainingPropertyDefinitions that extract property values from instances of the given class via the annotated methods.- See Also:
ProvidesProperty
-
-
Constructor Summary
Constructors Constructor Description ProvidesPropertyScanner(Class<T> type)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetPropertyCaption(MethodAnnotationScanner.MethodInfo methodInfo)Get the property caption.protected StringgetPropertyName(MethodAnnotationScanner.MethodInfo methodInfo)Get the property name.PropertySet<T>getPropertySet()Get thePropertySetgenerated from the annotated methods.
-
-
-
Constructor Detail
-
ProvidesPropertyScanner
public ProvidesPropertyScanner(Class<T> type)
Constructor.- Parameters:
type- Java class to be introspected- Throws:
IllegalArgumentException- iftypeis nullIllegalArgumentException- if an annotated method with no property name specified has a name which cannot be interpreted as a bean property "getter" methodIllegalArgumentException- iftypehas two@ProvidesProperty-annotated fields or methods with the same property name
-
-
Method Detail
-
getPropertySet
public PropertySet<T> getPropertySet()
Get thePropertySetgenerated from the annotated methods.- Returns:
- property set
-
getPropertyName
protected String getPropertyName(MethodAnnotationScanner.MethodInfo methodInfo)
Get the property name.- Parameters:
methodInfo- method info- Returns:
- property name
-
getPropertyCaption
protected String getPropertyCaption(MethodAnnotationScanner.MethodInfo methodInfo)
Get the property caption.- Parameters:
methodInfo- method info- Returns:
- property caption
-
-