Package org.dellroad.stuff.vaadin7
Class ProvidesPropertyScanner<T>
- java.lang.Object
-
- org.dellroad.stuff.vaadin7.ProvidesPropertyScanner<T>
-
- Type Parameters:
T- Java class to be introspected
public class ProvidesPropertyScanner<T> extends Object
Scans a Java class hierarchy for@ProvidesPropertyand@ProvidesPropertySortannotated getter methods and creates a corresponding set ofPropertyDefproperty definitions and aSortingPropertyExtractorthat will extract the properties from instances of the given class and sort them accordingly.- See Also:
ProvidesProperty,ProvidesPropertySort
-
-
Constructor Summary
Constructors Constructor Description ProvidesPropertyScanner(Class<T> type)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<PropertyDef<?>>getPropertyDefs()Get the list ofPropertyDefs generated from the annotated methods.SortingPropertyExtractor<T>getPropertyExtractor()Get thePropertyExtractorthat extracts VaadinPropertyvalues from instances of the annotated class when given one of thePropertyDefs returned bygetPropertyDefs().
-
-
-
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
-
getPropertyDefs
public List<PropertyDef<?>> getPropertyDefs()
Get the list ofPropertyDefs generated from the annotated methods.All of the properties in the returned list can be extracted from instances of this reader's configured class by the
PropertyExtractorreturned bygetPropertyExtractor().- Returns:
- unmodifiable list of properties
- See Also:
getPropertyExtractor()
-
getPropertyExtractor
public SortingPropertyExtractor<T> getPropertyExtractor()
Get thePropertyExtractorthat extracts VaadinPropertyvalues from instances of the annotated class when given one of thePropertyDefs returned bygetPropertyDefs().- Returns:
- associated property extractor
- See Also:
getPropertyDefs()
-
-