org.apache.commons.clazz.reflect.common
Class ReflectedScalarPropertyIntrospector

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

public class ReflectedScalarPropertyIntrospector
extends ReflectedPropertyIntrospectorSupport

A ReflectedPropertyIntrospector that discovers scalar properties.

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

Nested Class Summary
static class ReflectedScalarPropertyIntrospector.JBReadAccessorMethodParser
          Parser for the getFoo() method: Return type not void Name starts with "get" followed by capitalized property name.
static class ReflectedScalarPropertyIntrospector.ReadAccessorMethodParser
          Parser for the getFoo() method: Return type not void Name starts with "get" followed by capitalized property name.
static class ReflectedScalarPropertyIntrospector.WriteAccessorMethodParser
          Parser for the setFoo(value) method: Return type void Name starts with "set" followed by capitalized property name One parameter
 
Field Summary
protected static AccessorMethodParser READ_METHOD_PARSER
           
protected static AccessorMethodParser WRITE_METHOD_PARSER
           
 
Constructor Summary
ReflectedScalarPropertyIntrospector()
           
 
Method Summary
protected  ReflectedAccessorPairProperty createProperty(ReflectedClazz clazz, ReflectedPropertyParseResults parseResults)
          Creates a new ReflectedAccessorPairProperty based on parse results.
protected  ReflectedScalarPropertyParseResults getParseResults(ReflectedClazz clazz, Map parseResultMap, String propertyName)
          Finds a ReflectedScalarPropertyParseResults for the given propertyName or creates a new one and puts it in the map.
protected  AccessorMethodParser getReadAccessorMethodParser()
          Override to return an alternative parser for the read accessor method.
protected  AccessorMethodParser getWriteAccessorMethodParser()
           
 void introspectProperties(ReflectedClazz clazz, Class javaClass, Map parseResultMap)
           
 
Methods inherited from class org.apache.commons.clazz.reflect.common.ReflectedPropertyIntrospectorSupport
introspectDeclaredProperties, introspectProperties, isCorrectPluralForm, isCorrectPluralSuffix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

READ_METHOD_PARSER

protected static final AccessorMethodParser READ_METHOD_PARSER

WRITE_METHOD_PARSER

protected static final AccessorMethodParser WRITE_METHOD_PARSER
Constructor Detail

ReflectedScalarPropertyIntrospector

public ReflectedScalarPropertyIntrospector()
Method Detail

introspectProperties

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

getReadAccessorMethodParser

protected AccessorMethodParser getReadAccessorMethodParser()
Override to return an alternative parser for the read accessor method.


getWriteAccessorMethodParser

protected AccessorMethodParser getWriteAccessorMethodParser()

getParseResults

protected ReflectedScalarPropertyParseResults getParseResults(ReflectedClazz clazz,
                                                              Map parseResultMap,
                                                              String propertyName)
Finds a ReflectedScalarPropertyParseResults for the given propertyName or creates a new one and puts it in the map.


createProperty

protected ReflectedAccessorPairProperty createProperty(ReflectedClazz clazz,
                                                       ReflectedPropertyParseResults parseResults)
Creates a new ReflectedAccessorPairProperty based on parse results.

Specified by:
createProperty in class ReflectedPropertyIntrospectorSupport


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