com.iplanet.jato.util
Class MethodSpec

java.lang.Object
  |
  +--com.iplanet.jato.util.MethodSpec

public class MethodSpec
extends java.lang.Object

Utility which encapsulates both the specification of an arbitary method signature and behavior for matching these specifications against a particular class member. In addition to fully specifying the signature of a method including return type parameter types, one may optionally provide a wildcard pattern for the method name. For example, all of the following patterns possible:

 foo
 foo*
 fo*o
 *foo
 

Version:
JATO/1.2.2 $Id: MethodSpec.java,v 1.7 2002/03/16 03:26:38 todd Exp $
See Also:
MethodRegistry

Constructor Summary
MethodSpec(java.lang.String nameSpec, java.lang.Class returnType, java.lang.Class[] parameterTypes)
          Create a method specification based method name pattern, return type, and list of parameter types.
 
Method Summary
 java.lang.String getNameSpec()
           
 java.lang.Class[] getParameterTypes()
           
 java.lang.Class getReturnType()
           
 boolean matches(java.lang.reflect.Method method)
          Matches this method specification against supplied class method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodSpec

public MethodSpec(java.lang.String nameSpec,
                  java.lang.Class returnType,
                  java.lang.Class[] parameterTypes)
Create a method specification based method name pattern, return type, and list of parameter types.
Parameters:
nameSpec - non-blank and non-null string with option for single '*' in pattern
returnType - class of return value or null if void
parameterTypes - array of class objects in order for all parameters in the method
Method Detail

matches

public boolean matches(java.lang.reflect.Method method)
Matches this method specification against supplied class method.
Parameters:
method - java.lang.reflect.Method used to check against this specification
Returns:
true if the supplied java.lang.reflect.Method matches this specification
See Also:
"java.lang.relfect"

getNameSpec

public java.lang.String getNameSpec()

getReturnType

public java.lang.Class getReturnType()

getParameterTypes

public java.lang.Class[] getParameterTypes()