com.ibm.wsspi.anno.info
Interface MethodInfo

All Superinterfaces:
Info

public interface MethodInfo
extends Info

Info object type representing a java method.

The name and qualified name of a method info object are different: The qualified name of a field includes the name of the class declaring the method.


Method Summary
 AnnotationValue getAnnotationDefaultValue()
          If this method is on an annotation interface, answer the default value of the method.
 ClassInfo getDeclaringClass()
          Answer the info object of the class which declared this method.
 java.lang.String getDescription()
           
 java.util.List<java.lang.String> getExceptionTypeNames()
          Answer the set of names of the exceptions which may be thrown by this method.
 java.util.List<? extends ClassInfo> getExceptionTypes()
          Answer the class info objects of the exceptions which may be thrown by this method.
 java.util.List<java.util.List<? extends AnnotationInfo>> getParameterAnnotations()
          Answer the in-order parameter annotation collections of parameters of this method.
 java.util.List<java.lang.String> getParameterTypeNames()
          Answer the in-order names of the types of the parameters of this method.
 java.util.List<? extends ClassInfo> getParameterTypes()
          Answer the in-order types of the parameters of this method.
 java.lang.String getQualifiedName()
          Answer the qualified name of the receiver.
 ClassInfo getReturnType()
          Answer the class info object of the return type of this method.
 java.lang.String getReturnTypeName()
          Answer the name of the return type of this method.
 java.lang.String getSignature()
          Answer a string encoding the signature of this method.
 
Methods inherited from interface com.ibm.wsspi.anno.info.Info
getAnnotation, getAnnotation, getAnnotations, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotations, getHashText, getInfoStore, getModifiers, getName, isAnnotationPresent, isAnnotationPresent, isAnnotationWithin, isDeclaredAnnotationPresent, isDeclaredAnnotationPresent, isDeclaredAnnotationWithin, isPackagePrivate, isPrivate, isProtected, isPublic, log
 

Method Detail

getDeclaringClass

ClassInfo getDeclaringClass()

Answer the info object of the class which declared this method.

Returns:
The info object of the class which declares this method.

getQualifiedName

java.lang.String getQualifiedName()

Answer the qualified name of the receiver. For methods, the qualified name is the declaring class name plus "." plus the method name.

Qualified names provide unique IDs for packages, classes, methods, and methods. The names of annotations are the names of an annotation class, and are not unique.

Specified by:
getQualifiedName in interface Info
Returns:
The qualified name of the receiver.

getParameterTypeNames

java.util.List<java.lang.String> getParameterTypeNames()

Answer the in-order names of the types of the parameters of this method. (Note: These are the parameter type names, not the parameter names.)

Returns:
The in-order names of the types of the parameters of this method.
See Also:
getParameterTypes()

getParameterTypes

java.util.List<? extends ClassInfo> getParameterTypes()

Answer the in-order types of the parameters of this method.

The in-order types of the parameters of this method.


getExceptionTypeNames

java.util.List<java.lang.String> getExceptionTypeNames()

Answer the set of names of the exceptions which may be thrown by this method.

Returns:
The names of the exceptions which may be thrown by this method, returned as a set.
See Also:
#getExceptionNames()

getExceptionTypes

java.util.List<? extends ClassInfo> getExceptionTypes()

Answer the class info objects of the exceptions which may be thrown by this method. (No order of the returned class info objects is guaranteed.)

Returns:
The class info objects of the exceptions which may be thrown by this method.

getReturnTypeName

java.lang.String getReturnTypeName()

Answer the name of the return type of this method.

For a non-primitive non-void return type, the java qualified class name of the return type is returned. For primitive types, a singleton string is returned, per the java descriptor of the return type:

Returns:
The name of the return type of this method.

getReturnType

ClassInfo getReturnType()

Answer the class info object of the return type of this method. Note that a non-null class info object is returned in all cases, including void. (void.class is a valid java class.

).

Returns:
The class info object of the return type of this method.

getSignature

java.lang.String getSignature()

Answer a string encoding the signature of this method. This is a collation of the qualified name of the method, and of a parenthesized and comma delimited list of the types of the parameters of the method.

For example: methodWithEmptyParameters(), methodWithTwoParameters(java.lang.String, myPackage.myClass).

Returns:
A string encoding the signature of this method.

getDescription

java.lang.String getDescription()

getParameterAnnotations

java.util.List<java.util.List<? extends AnnotationInfo>> getParameterAnnotations()

Answer the in-order parameter annotation collections of parameters of this method.

Returns:
The in-order parameter annotation collections of parameters of this method.

getAnnotationDefaultValue

AnnotationValue getAnnotationDefaultValue()

If this method is on an annotation interface, answer the default value of the method. If no default is defined, or if this method is not on an annotation interface, answer null.