Top Description Methods
org.glassfish.pfl.dynamic.codegen.spi

public Interface MethodInfo

extends MemberInfo
Known Direct Subinterfaces
org.glassfish.pfl.dynamic.codegen.spi.ModifiableMethod
Known Direct Implementers
org.glassfish.pfl.dynamic.codegen.impl.MethodInfoBase
Imports
java.lang.reflect.Constructor, .Method, java.util.List

An interface that provides information about methods. This can be used to describe both MethodGenerators that are used to generate code and pre-existing Java classes.

Method Summary

Modifier and TypeMethod and Description
public List<Variable>
arguments()

Return a list of arguments for this method.

public List<Type>
exceptions()

Return a list of all Exception types that are declared as being throwable from this method.

public Constructor<T>
getConstructor()

Return the Constructor that is represented by this MethodInfo, or null if no such Constructor instance exists (because this MethodInfo represents a Constructor being generated, rather than a Constructor in a Class that is loaded into the VM).

public Method
getMethod()

Return the Method that is represented by this MethodInfo, or null if no such Method instance exists (because this MethodInfo represents a Method being generated, rather than a Method in a Class that is loaded into the VM).

public boolean
isConstructor()

Returns true if this is a constructor, false if method.

public Type
returnType()

Return the Type that is returned by this method.

public Signature
signature()

Return the signature of this method.

Inherited from org.glassfish.pfl.dynamic.codegen.spi.MemberInfo:
isAccessibleInContextmodifiersmyClassInfoname

Method Detail

argumentsback to summary
public List<Variable> arguments()

Return a list of arguments for this method.

exceptionsback to summary
public List<Type> exceptions()

Return a list of all Exception types that are declared as being throwable from this method.

getConstructorback to summary
public Constructor<T> getConstructor()

Return the Constructor that is represented by this MethodInfo, or null if no such Constructor instance exists (because this MethodInfo represents a Constructor being generated, rather than a Constructor in a Class that is loaded into the VM).

Exceptions
IllegalStateException:
if isConstructor() is false.
getMethodback to summary
public Method getMethod()

Return the Method that is represented by this MethodInfo, or null if no such Method instance exists (because this MethodInfo represents a Method being generated, rather than a Method in a Class that is loaded into the VM).

Exceptions
IllegalStateException:
if isConstructor() is true.
isConstructorback to summary
public boolean isConstructor()

Returns true if this is a constructor, false if method.

returnTypeback to summary
public Type returnType()

Return the Type that is returned by this method.

signatureback to summary
public Signature signature()

Return the signature of this method.