Coverage Report - org.apache.tapestry.enhance.ClassInspector
 
Classes in this File Line Coverage Branch Coverage Complexity
ClassInspector
N/A
N/A
1
 
 1  
 // Copyright 2004, 2005 The Apache Software Foundation
 2  
 //
 3  
 // Licensed under the Apache License, Version 2.0 (the "License");
 4  
 // you may not use this file except in compliance with the License.
 5  
 // You may obtain a copy of the License at
 6  
 //
 7  
 //     http://www.apache.org/licenses/LICENSE-2.0
 8  
 //
 9  
 // Unless required by applicable law or agreed to in writing, software
 10  
 // distributed under the License is distributed on an "AS IS" BASIS,
 11  
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12  
 // See the License for the specific language governing permissions and
 13  
 // limitations under the License.
 14  
 package org.apache.tapestry.enhance;
 15  
 
 16  
 import java.lang.reflect.Method;
 17  
 
 18  
 
 19  
 /**
 20  
  * Service that provides a common interface to other lower level reflection services
 21  
  * to provide a common set of functionality for reflection when using a 1.4 or >= 1.5 jre.
 22  
  */
 23  
 public interface ClassInspector
 24  
 {
 25  
 
 26  
     /**
 27  
      * Gets a compatible method signature for the specific generic {@link Method} object.
 28  
      * 
 29  
      * @param implementing
 30  
      *          The class implmeneting the specific method.
 31  
      * @param m
 32  
      *      The method object to generate a signature for.
 33  
      * @return A signature for the method.
 34  
      */
 35  
     MethodSignature getMethodSignature(Class implementing, Method m);
 36  
     
 37  
     /**
 38  
      * Gets the first available method for the specified property. It may be a write or read method, but
 39  
      * read will be preferred to write. 
 40  
      * 
 41  
      * @param type
 42  
      *          The base class to introspect for the property accessor.
 43  
      * @param propertyName
 44  
      *          The name of the javabeans style property to look for. (ie "value" would be "getValue" )
 45  
      *          
 46  
      * @return A compatible method signature, or null if none could be found.
 47  
      */
 48  
     MethodSignature getPropertyAccessor(Class type, String propertyName);
 49  
 }