org.apache.commons.clazz.reflect.extended
Class ExtendedReflectedListPropertyIntrospector

java.lang.Object
  extended by org.apache.commons.clazz.reflect.common.ReflectedPropertyIntrospectorSupport
      extended by org.apache.commons.clazz.reflect.common.ReflectedListPropertyIntrospectorSupport
          extended by org.apache.commons.clazz.reflect.extended.ExtendedReflectedListPropertyIntrospector
All Implemented Interfaces:
ReflectedPropertyIntrospector

public class ExtendedReflectedListPropertyIntrospector
extends ReflectedListPropertyIntrospectorSupport

A ReflectedPropertyIntrospector that discovers list (aka indexed) properties.

Version:
$Id: ExtendedReflectedListPropertyIntrospector.java 155436 2005-02-26 13:17:48Z dirkv $
Author:
Dmitri Plotnikov

Nested Class Summary
static class ExtendedReflectedListPropertyIntrospector.AddAccessorMethodParser
          Parser for the addFoo(value) method: Return type void Name starts with "add" followed by capitalized singular form of the property name One parameter
static class ExtendedReflectedListPropertyIntrospector.AddIndexedAccessorMethodParser
          Parser for the addFoo(index, value) method: Return type void Name starts with "add" followed by capitalized singular form of the property name Two parameters, first integer
static class ExtendedReflectedListPropertyIntrospector.RemoveAccessorMethodParser
          Parser for the removeFoo(value) method: Name starts with "remove" followed by capitalized singular form of the property name One parameter
static class ExtendedReflectedListPropertyIntrospector.RemoveIndexedAccessorMethodParser
          Parser for the removeFoo(index) method: Name starts with "remove" followed by capitalized singular form of the property name One integer parameter
static class ExtendedReflectedListPropertyIntrospector.SizeAccessorMethodParser
          Parser for the getFooCount() method: Returns integer Name starts with "get" followed by capitalized singular form of the property name, followed by "Count" or "Size" No parameters
 
Nested classes/interfaces inherited from class org.apache.commons.clazz.reflect.common.ReflectedListPropertyIntrospectorSupport
ReflectedListPropertyIntrospectorSupport.GetAccessorMethodParser, ReflectedListPropertyIntrospectorSupport.ReadAccessorMethodParser, ReflectedListPropertyIntrospectorSupport.SetAccessorMethodParser, ReflectedListPropertyIntrospectorSupport.WriteAccessorMethodParser
 
Field Summary
protected static AccessorMethodParser ADD_INDEXED_METHOD_PARSER
           
protected static AccessorMethodParser ADD_METHOD_PARSER
           
protected static AccessorMethodParser REMOVE_INDEXED_METHOD_PARSER
           
protected static AccessorMethodParser REMOVE_METHOD_PARSER
           
protected static AccessorMethodParser SIZE_METHOD_PARSER
           
 
Fields inherited from class org.apache.commons.clazz.reflect.common.ReflectedListPropertyIntrospectorSupport
GET_METHOD_PARSER, READ_METHOD_PARSER, SET_METHOD_PARSER, WRITE_METHOD_PARSER
 
Constructor Summary
ExtendedReflectedListPropertyIntrospector()
           
 
Method Summary
protected  AccessorMethodParser getAddAccessorMethodParser()
           
protected  AccessorMethodParser getAddIndexedAccessorMethodParser()
           
protected  AccessorMethodParser getRemoveAccessorMethodParser()
           
protected  AccessorMethodParser getRemoveIndexedAccessorMethodParser()
           
protected  AccessorMethodParser getSizeAccessorMethodParser()
           
 void introspectProperties(ReflectedClazz clazz, Class javaClass, Map parseResultMap)
           
protected  boolean isCorrectPluralSuffix(String singular, String suffix)
          Returns true if the suffix is "s" or "List", "Array" or "Vector".
 
Methods inherited from class org.apache.commons.clazz.reflect.common.ReflectedListPropertyIntrospectorSupport
createProperty, findBySingularName, getGetAccessMethodParser, getParseResults, getReadAccessMethodParser, getSetAccessMethodParser, getWriteAccessMethodParser, mergeSingularMethods
 
Methods inherited from class org.apache.commons.clazz.reflect.common.ReflectedPropertyIntrospectorSupport
introspectDeclaredProperties, introspectProperties, isCorrectPluralForm
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADD_METHOD_PARSER

protected static final AccessorMethodParser ADD_METHOD_PARSER

ADD_INDEXED_METHOD_PARSER

protected static final AccessorMethodParser ADD_INDEXED_METHOD_PARSER

REMOVE_INDEXED_METHOD_PARSER

protected static final AccessorMethodParser REMOVE_INDEXED_METHOD_PARSER

REMOVE_METHOD_PARSER

protected static final AccessorMethodParser REMOVE_METHOD_PARSER

SIZE_METHOD_PARSER

protected static final AccessorMethodParser SIZE_METHOD_PARSER
Constructor Detail

ExtendedReflectedListPropertyIntrospector

public ExtendedReflectedListPropertyIntrospector()
Method Detail

introspectProperties

public void introspectProperties(ReflectedClazz clazz,
                                 Class javaClass,
                                 Map parseResultMap)
Specified by:
introspectProperties in class ReflectedPropertyIntrospectorSupport

getAddAccessorMethodParser

protected AccessorMethodParser getAddAccessorMethodParser()

getAddIndexedAccessorMethodParser

protected AccessorMethodParser getAddIndexedAccessorMethodParser()

getRemoveAccessorMethodParser

protected AccessorMethodParser getRemoveAccessorMethodParser()

getRemoveIndexedAccessorMethodParser

protected AccessorMethodParser getRemoveIndexedAccessorMethodParser()

getSizeAccessorMethodParser

protected AccessorMethodParser getSizeAccessorMethodParser()

isCorrectPluralSuffix

protected boolean isCorrectPluralSuffix(String singular,
                                        String suffix)
Returns true if the suffix is "s" or "List", "Array" or "Vector".

Overrides:
isCorrectPluralSuffix in class ReflectedPropertyIntrospectorSupport
See Also:
ReflectedPropertyIntrospectorSupport.isCorrectPluralSuffix(String,String)


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.