|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.clazz.reflect.common.AccessorMethodParser
| Constructor Summary | |
AccessorMethodParser()
|
|
| Method Summary | |
protected String |
decapitalize(String string)
Changes the first character of the string
to lower case, unless the second character is
upper case. |
protected Class |
getParameterType(Method method)
Extract the parameter type from the method, if it has one. |
protected String |
getPropertyName(Method method)
Parse method name and return the corresponding property name. |
protected Class |
getValueType(Method method)
Extract the value type from the method. |
AccessorMethodParseResults |
parse(Method method)
Parses the supplied method according to the parser's configuration. |
protected int |
requiredParameterCount()
If a method parsed by this parser must have a number or parameters, override and return that number. |
protected String |
requiredPrefix()
If a method parsed by this parser must have a certain prefix, override and return a non-null prefix string |
protected String |
testAndRemoveSuffix(String methodName)
If a method parsed by this parser must have a certain suffix, override this method, check that it does and remove the suffix. |
protected boolean |
testFirstCharacterOfPropertyName(char ch)
Returns true if the character can be the first character of a Capitalized property name. |
protected boolean |
testParameterType(int index,
Class parameterType)
To check constraints on the type of a parameter, override and perform the check. |
protected boolean |
testReturnType(Class javaClass)
To check constraints on the return type of methods parsed by this parser, override and perform the check. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AccessorMethodParser()
| Method Detail |
protected int requiredParameterCount()
protected String requiredPrefix()
protected boolean testReturnType(Class javaClass)
protected boolean testParameterType(int index,
Class parameterType)
protected String testAndRemoveSuffix(String methodName)
protected boolean testFirstCharacterOfPropertyName(char ch)
protected Class getValueType(Method method)
protected Class getParameterType(Method method)
public AccessorMethodParseResults parse(Method method)
protected String getPropertyName(Method method)
The default implementation of the method checks if the method name starts with the specified prefix followed by an optionally capitalized property name. * @param methodName * @return String
protected String decapitalize(String string)
string
to lower case, unless the second character is
upper case. This is consistent with the JavaBean specification.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||