Package org.apache.juneau.junit.bct
Class PropertyExtractors
java.lang.Object
org.apache.juneau.junit.bct.PropertyExtractors
Collection of standard property extractor implementations for the Bean-Centric Testing framework.
This class provides the built-in property extraction strategies that handle the most common
object types and property access patterns. These extractors are automatically registered when
using BasicBeanConverter.Builder.defaultSettings()
.
Extractor Hierarchy:
The extractors form an inheritance hierarchy for code reuse:
PropertyExtractors.ObjectPropertyExtractor
- Base class with JavaBean property accessPropertyExtractors.ListPropertyExtractor
- Extends ObjectPropertyExtractor with array/collection supportPropertyExtractors.MapPropertyExtractor
- Extends ObjectPropertyExtractor with Map key access
Execution Order:
In BasicBeanConverter
, the extractors are tried in this order:
- Custom extractors - User-registered extractors via
BasicBeanConverter.Builder.addPropertyExtractor(PropertyExtractor)
PropertyExtractors.ObjectPropertyExtractor
- JavaBean properties, fields, and methodsPropertyExtractors.ListPropertyExtractor
- Array/collection indices and size propertiesPropertyExtractors.MapPropertyExtractor
- Map key access and size property
Property Access Strategy:
Each extractor implements a comprehensive fallback strategy for maximum compatibility:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Property extractor for array and collection objects with numeric indexing and size access.static class
Property extractor for Map objects with direct key access and size property.static class
Standard JavaBean property extractor using reflection. -
Method Summary