com.ibm.wsspi.anno.info

Interface MethodInfo

All Superinterfaces:
Info

  1. public interface MethodInfo
  2. 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

Modifier and Type Method and Description
  1. AnnotationValue
getAnnotationDefaultValue()
If this method is on an annotation interface, answer the default value of the method.
  1. ClassInfo
getDeclaringClass()
Answer the info object of the class which declared this method.
  1. java.lang.String
getDescription()
  1. java.util.List<java.lang.String>
getExceptionTypeNames()
Answer the set of names of the exceptions which may be thrown by this method.
  1. java.util.List<? extends ClassInfo>
getExceptionTypes()
Answer the class info objects of the exceptions which may be thrown by this method.
  1. java.util.List<java.util.List<? extends AnnotationInfo>>
getParameterAnnotations()
Answer the in-order parameter annotation collections of parameters of this method.
  1. java.util.List<java.lang.String>
getParameterTypeNames()
Answer the in-order names of the types of the parameters of this method.
  1. java.util.List<? extends ClassInfo>
getParameterTypes()
Answer the in-order types of the parameters of this method.
  1. java.lang.String
getQualifiedName()
Answer the qualified name of the receiver.
  1. ClassInfo
getReturnType()
Answer the class info object of the return type of this method.
  1. java.lang.String
getReturnTypeName()
Answer the name of the return type of this method.
  1. 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

  1. 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

  1. 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

  1. 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

  1. 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

  1. 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

  1. 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

  1. 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:

  • void: V
  • boolean: Z
  • char: C
  • byte: B
  • short: S
  • int: I
  • float: F
  • long: J
  • double: D
Returns:
The name of the return type of this method.

getReturnType

  1. 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

  1. 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

  1. java.lang.String getDescription( )

getParameterAnnotations

  1. 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

  1. 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.