recoder.bytecode
Class MethodInfo
java.lang.Object
recoder.bytecode.ByteCodeElement
recoder.bytecode.MemberInfo
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
| 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.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)
|
| 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 |
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
MethodInfo
public MethodInfo(int accessFlags,
java.lang.String returntype,
java.lang.String name,
java.lang.String[] paramtypes,
java.lang.String[] exceptions,
ClassFile cf)
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