com.caucho.ejb.cfg
Class ApiMethod

java.lang.Object
  extended by com.caucho.ejb.cfg.ApiMethod

public class ApiMethod
extends java.lang.Object

Represents an introspected method.


Constructor Summary
ApiMethod(ApiClass apiClass, java.lang.reflect.Method method, java.util.HashMap<java.lang.String,java.lang.reflect.Type> typeMap)
          Creates a new method.
 
Method Summary
 boolean equals(java.lang.Object o)
           
<T extends java.lang.annotation.Annotation>
T
getAnnotation(java.lang.Class<T> annType)
          Returns true if the annotation exists.
 java.lang.Class getDeclaringClass()
          Returns the declaring class
 java.lang.Class[] getExceptionTypes()
          Returns the method exception types.
 java.lang.String getFullName()
           
 java.lang.reflect.Method getMethod()
          Returns the underlying method.
 java.lang.String getName()
          Returns the method name.
 java.lang.Class[] getParameterTypes()
          Returns the method parameter types.
 java.lang.Class getReturnType()
          Gets the return type.
 int hashCode()
           
 boolean isAbstract()
          Returns true for an abstract method.
 boolean isAnnotationPresent(java.lang.Class annotationType)
          Returns an annotation.
 boolean isFinal()
          Returns true for a final method.
 boolean isMatch(ApiMethod method)
          Returns true if the method name matches.
 boolean isMatch(java.lang.String name, java.lang.Class[] param)
          Returns true if the method name matches.
 boolean isProtected()
          Returns true for a protected method.
 boolean isPublic()
          Returns true for a public method.
 boolean isStatic()
          Returns true for a static method.
 boolean isVarArgs()
          Returns true for var args
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApiMethod

public ApiMethod(ApiClass apiClass,
                 java.lang.reflect.Method method,
                 java.util.HashMap<java.lang.String,java.lang.reflect.Type> typeMap)
Creates a new method.

Parameters:
topClass - the top class
method - the introspected method
Method Detail

getMethod

public java.lang.reflect.Method getMethod()
Returns the underlying method.


getName

public java.lang.String getName()
Returns the method name.


getDeclaringClass

public java.lang.Class getDeclaringClass()
Returns the declaring class


isPublic

public boolean isPublic()
Returns true for a public method.


isProtected

public boolean isProtected()
Returns true for a protected method.


isStatic

public boolean isStatic()
Returns true for a static method.


isFinal

public boolean isFinal()
Returns true for a final method.


isAbstract

public boolean isAbstract()
Returns true for an abstract method.


getParameterTypes

public java.lang.Class[] getParameterTypes()
Returns the method parameter types.


isVarArgs

public boolean isVarArgs()
Returns true for var args


getReturnType

public java.lang.Class getReturnType()
Gets the return type.


getExceptionTypes

public java.lang.Class[] getExceptionTypes()
Returns the method exception types.


getAnnotation

public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annType)
Returns true if the annotation exists.


isAnnotationPresent

public boolean isAnnotationPresent(java.lang.Class annotationType)
Returns an annotation.


isMatch

public boolean isMatch(ApiMethod method)
Returns true if the method name matches.


isMatch

public boolean isMatch(java.lang.String name,
                       java.lang.Class[] param)
Returns true if the method name matches.


hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getFullName

public java.lang.String getFullName()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object