RECODER 0.92

recoder.bytecode
Class MethodInfo

java.lang.Object
  extended by recoder.bytecode.ByteCodeElement
      extended by recoder.bytecode.MemberInfo
          extended by recoder.bytecode.MethodInfo
All Implemented Interfaces:
ClassTypeContainer, Member, Method, ProgramModelElement, AccessFlags, ModelElement, NamedModelElement
Direct Known Subclasses:
AnnotationPropertyInfo, ConstructorInfo

public class MethodInfo
extends MemberInfo
implements Method


Nested Class Summary
 
Nested classes/interfaces inherited from interface recoder.abstraction.ProgramModelElement
ProgramModelElement.LexicalOrder
 
Nested classes/interfaces inherited from interface recoder.abstraction.ProgramModelElement
ProgramModelElement.LexicalOrder
 
Field Summary
protected  java.lang.String[] exceptions
           
protected  AnnotationUseInfo[][] paramAnnotations
           
protected  java.util.List<TypeArgumentInfo>[] paramTypeArgs
           
protected  java.lang.String[] paramtypes
           
protected  java.lang.String returntype
           
protected  java.util.List<TypeParameterInfo> typeParms
           
 
Fields inherited from class recoder.bytecode.MemberInfo
parent
 
Fields inherited from class recoder.bytecode.ByteCodeElement
accessFlags, service
 
Fields inherited from interface recoder.abstraction.ProgramModelElement
LEXICAL_ORDER
 
Fields inherited from interface recoder.bytecode.AccessFlags
ABSTRACT, ANNOTATION, BRIDGE, ENUM, FINAL, INTERFACE, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SUPER, SYNCHRONIZED, SYNTHETIC, TRANSIENT, VARARGS, VOLATILE
 
Fields inherited from interface recoder.abstraction.ProgramModelElement
LEXICAL_ORDER
 
Fields inherited from interface recoder.bytecode.AccessFlags
ABSTRACT, ANNOTATION, BRIDGE, ENUM, FINAL, INTERFACE, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SUPER, SYNCHRONIZED, SYNTHETIC, TRANSIENT, VARARGS, VOLATILE
 
Constructor Summary
MethodInfo(int accessFlags, java.lang.String returntype, java.lang.String name, java.lang.String[] paramtypes, java.lang.String[] exceptions, ClassFile cf)
           
 
Method Summary
 AnnotationUseInfo[] getAnnotationsForParam(int paramNum)
           
 java.lang.String getBinaryName()
          Returns the binary name.
 ClassTypeContainer getContainer()
          Returns the enclosing package or class type, or method.
 java.util.List<ClassType> getExceptions()
          Returns the exceptions of this method or constructor.
 java.lang.String[] getExceptionsInfo()
           
 java.lang.String getFullName()
          Returns the maximal expanded name including all applicable qualifiers.
 Package getPackage()
          Returns the package this element is defined in.
 java.lang.String[] getParameterTypeNames()
           
 Type getReturnType()
          Returns the return type of this method.
 java.util.List<Type> getSignature()
          Returns the signature of this method or constructor.
 java.util.List<TypeArgumentInfo> getTypeArgumentsForParam(int paramNum)
           
 java.util.List<TypeArgumentInfo> getTypeArgumentsForReturnType()
           
 java.lang.String getTypeName()
           
 java.util.List<TypeParameterInfo> getTypeParameters()
           
 java.util.List<? extends ClassType> getTypes()
          Returns the class types locally defined within this container.
 boolean isVarArgMethod()
          Checks if this method takes a variable number of arguments.
 java.lang.String toString()
           
 
Methods inherited from class recoder.bytecode.MemberInfo
getAnnotations, getContainingClassType, getParent, setParent
 
Methods inherited from class recoder.bytecode.ByteCodeElement
getAccessFlags, getName, getProgramModelInfo, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictFp, isSynchronized, setAccessFlags, setProgramModelInfo, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface recoder.abstraction.Method
isAbstract, isNative, isSynchronized
 
Methods inherited from interface recoder.abstraction.Member
getAnnotations, getContainingClassType, isFinal, isPrivate, isProtected, isPublic, isStatic, isStrictFp
 
Methods inherited from interface recoder.abstraction.ProgramModelElement
getProgramModelInfo, setProgramModelInfo
 
Methods inherited from interface recoder.NamedModelElement
getName
 
Methods inherited from interface recoder.ModelElement
validate
 
Methods inherited from interface recoder.abstraction.ProgramModelElement
getProgramModelInfo, setProgramModelInfo
 
Methods inherited from interface recoder.NamedModelElement
getName
 
Methods inherited from interface recoder.ModelElement
validate
 

Field Detail

paramtypes

protected java.lang.String[] paramtypes

returntype

protected java.lang.String returntype

exceptions

protected java.lang.String[] exceptions

paramAnnotations

protected AnnotationUseInfo[][] paramAnnotations

paramTypeArgs

protected java.util.List<TypeArgumentInfo>[] paramTypeArgs

typeParms

protected java.util.List<TypeParameterInfo> typeParms
Constructor Detail

MethodInfo

public MethodInfo(int accessFlags,
                  java.lang.String returntype,
                  java.lang.String name,
                  java.lang.String[] paramtypes,
                  java.lang.String[] exceptions,
                  ClassFile cf)
Method Detail

getParameterTypeNames

public final java.lang.String[] getParameterTypeNames()

getAnnotationsForParam

public final AnnotationUseInfo[] getAnnotationsForParam(int paramNum)

getTypeArgumentsForParam

public final java.util.List<TypeArgumentInfo> getTypeArgumentsForParam(int paramNum)

getTypeArgumentsForReturnType

public final java.util.List<TypeArgumentInfo> getTypeArgumentsForReturnType()

getExceptionsInfo

public final java.lang.String[] getExceptionsInfo()

getTypeName

public final java.lang.String getTypeName()
Specified by:
getTypeName in class ByteCodeElement

getReturnType

public Type getReturnType()
Description copied from interface: Method
Returns the return type of this method.

Specified by:
getReturnType in interface Method
Returns:
the return type of this method.

getSignature

public java.util.List<Type> getSignature()
Description copied from interface: Method
Returns the signature of this method or constructor.

Specified by:
getSignature in interface Method
Returns:
the signature of this method.

getExceptions

public java.util.List<ClassType> getExceptions()
Description copied from interface: Method
Returns the exceptions of this method or constructor.

Specified by:
getExceptions in interface Method
Returns:
the exceptions of this method.

getContainer

public ClassTypeContainer getContainer()
Description copied from interface: ClassTypeContainer
Returns the enclosing package or class type, or method. A package will report null, a methods its enclosing class.

Specified by:
getContainer in interface ClassTypeContainer
Returns:
the container of this element.

getPackage

public Package getPackage()
Description copied from interface: ClassTypeContainer
Returns the package this element is defined in. Packages have no recursive scope and report themselves.

Specified by:
getPackage in interface ClassTypeContainer
Returns:
the package of this element.

getTypes

public java.util.List<? extends ClassType> getTypes()
Description copied from interface: ClassTypeContainer
Returns the class types locally defined within this container. Returns inner types when this container is a class type.

Specified by:
getTypes in interface ClassTypeContainer
Returns:
a list of contained class types.

getFullName

public java.lang.String getFullName()
Description copied from interface: ProgramModelElement
Returns the maximal expanded name including all applicable qualifiers.

Specified by:
getFullName in interface ProgramModelElement
Returns:
the full name of this program model element.

getBinaryName

public java.lang.String getBinaryName()
Description copied from interface: ProgramModelElement
Returns the binary name. The binary name is the name this program model element would have in bytecode, i.e., how it either is read by the bytecode parser, or the name a compiler would give this element during the compilation process (if this program model element is represented in source code). See JLS, §13.1

Specified by:
getBinaryName in interface ProgramModelElement
Returns:
the bytecode name of this program model element

isVarArgMethod

public boolean isVarArgMethod()
Description copied from interface: Method
Checks if this method takes a variable number of arguments.

Specified by:
isVarArgMethod in interface Method
Returns:
true if this methods takes a variable number of arguments, false otherwise.

getTypeParameters

public java.util.List<TypeParameterInfo> getTypeParameters()
Specified by:
getTypeParameters in interface Method
Returns:

toString

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

RECODER 0.92