|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.clazz.reflect.common.ReflectedPropertyIntrospectorSupport org.apache.commons.clazz.reflect.common.ReflectedListPropertyIntrospectorSupport
public abstract class ReflectedListPropertyIntrospectorSupport
A ReflectedPropertyIntrospector that discovers list (aka indexed) properties.
Nested Class Summary | |
---|---|
static class |
ReflectedListPropertyIntrospectorSupport.GetAccessorMethodParser
Parser for the getFoo(int) method:
Return type not void
Name starts with "get" followed by capitalized singular
form of the property name
One integer parameter
|
static class |
ReflectedListPropertyIntrospectorSupport.ReadAccessorMethodParser
Parser for the getFooMap() method:
Return type not void
Name starts with "get" followed by capitalized property name
No parameters
We don't check if the parameter is a List here. |
static class |
ReflectedListPropertyIntrospectorSupport.SetAccessorMethodParser
Parser for the setFoo(index, value) method:
Return type void
Name starts with "set" followed by capitalized singular
form of the property name
Two parameters, first integer
|
static class |
ReflectedListPropertyIntrospectorSupport.WriteAccessorMethodParser
Parser for the setFooList(List) method:
Return type void
Name starts with "set" followed by capitalized property name
One parameter
We don't check if the parameter is a List here. |
Field Summary | |
---|---|
protected static AccessorMethodParser |
GET_METHOD_PARSER
|
protected static AccessorMethodParser |
READ_METHOD_PARSER
|
protected static AccessorMethodParser |
SET_METHOD_PARSER
|
protected static AccessorMethodParser |
WRITE_METHOD_PARSER
|
Constructor Summary | |
---|---|
ReflectedListPropertyIntrospectorSupport()
|
Method Summary | |
---|---|
protected ReflectedAccessorPairProperty |
createProperty(ReflectedClazz clazz,
ReflectedPropertyParseResults parseResults)
Creates a new ReflectedListProperty based on parse results. |
protected ReflectedListPropertyParseResults |
findBySingularName(Map parseResultMapPlural,
String singularName)
Given a singular form of a property name, locates parse results for a property with the corresponding plural name. |
protected AccessorMethodParser |
getGetAccessMethodParser()
|
protected ReflectedListPropertyParseResults |
getParseResults(ReflectedClazz clazz,
Map parseResultMap,
String propertyName)
Finds a ReflectedListPropertyParseResults for the given propertyName or creates a new one and puts it in the map. |
protected AccessorMethodParser |
getReadAccessMethodParser()
|
protected AccessorMethodParser |
getSetAccessMethodParser()
|
protected AccessorMethodParser |
getWriteAccessMethodParser()
|
protected void |
mergeSingularMethods(Map parseResultMapPlural,
Map parseResultMapSingular)
Combines data collected from singular methods like getFoo(index) with Properties, which already
contain data about plural methods like getFooList() . |
Methods inherited from class org.apache.commons.clazz.reflect.common.ReflectedPropertyIntrospectorSupport |
---|
introspectDeclaredProperties, introspectProperties, introspectProperties, isCorrectPluralForm, isCorrectPluralSuffix |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final AccessorMethodParser READ_METHOD_PARSER
protected static final AccessorMethodParser WRITE_METHOD_PARSER
protected static final AccessorMethodParser GET_METHOD_PARSER
protected static final AccessorMethodParser SET_METHOD_PARSER
Constructor Detail |
---|
public ReflectedListPropertyIntrospectorSupport()
Method Detail |
---|
protected AccessorMethodParser getReadAccessMethodParser()
protected AccessorMethodParser getWriteAccessMethodParser()
protected AccessorMethodParser getGetAccessMethodParser()
protected AccessorMethodParser getSetAccessMethodParser()
protected ReflectedListPropertyParseResults getParseResults(ReflectedClazz clazz, Map parseResultMap, String propertyName)
protected void mergeSingularMethods(Map parseResultMapPlural, Map parseResultMapSingular)
getFoo(index)
with Properties, which already
contain data about plural methods like getFooList()
.
protected ReflectedListPropertyParseResults findBySingularName(Map parseResultMapPlural, String singularName)
protected ReflectedAccessorPairProperty createProperty(ReflectedClazz clazz, ReflectedPropertyParseResults parseResults)
createProperty
in class ReflectedPropertyIntrospectorSupport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |