org.apache.tapestry.enhance
Class GenericsClassInspectorImpl

java.lang.Object
  extended by org.apache.tapestry.enhance.GenericsClassInspectorImpl
All Implemented Interfaces:
ClassInspector

public class GenericsClassInspectorImpl
extends Object
implements ClassInspector

Implementation of ClassInspector that can properly handle jre 1.5 generic types.


Constructor Summary
GenericsClassInspectorImpl()
           
 
Method Summary
 MethodSignature getMethodSignature(Class implementing, Method m)
          Gets a compatible method signature for the specific generic Method object.
 MethodSignature getPropertyAccessor(Class type, String propertyName)
          Gets the first available method for the specified property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericsClassInspectorImpl

public GenericsClassInspectorImpl()
Method Detail

getMethodSignature

public MethodSignature getMethodSignature(Class implementing,
                                          Method m)
Gets a compatible method signature for the specific generic Method object.

Specified by:
getMethodSignature in interface ClassInspector
Parameters:
implementing - The class implmeneting the specific method.
m - The method object to generate a signature for.
Returns:
A signature for the method.

getPropertyAccessor

public MethodSignature getPropertyAccessor(Class type,
                                           String propertyName)
Gets the first available method for the specified property. It may be a write or read method, but read will be preferred to write.

Specified by:
getPropertyAccessor in interface ClassInspector
Parameters:
type - The base class to introspect for the property accessor.
propertyName - The name of the javabeans style property to look for. (ie "value" would be "getValue" )
Returns:
A compatible method signature, or null if none could be found.


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.