Interface MethodInfo
-
- All Superinterfaces:
MemberInfo
- All Known Subinterfaces:
ModifiableMethod
- All Known Implementing Classes:
MethodGenerator
,MethodInfoBase
,MethodInfoReflectiveImpl
public interface MethodInfo extends MemberInfo
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<Variable>
arguments()
Return a list of arguments for this method.java.util.List<Type>
exceptions()
Return a list of all Exception types that are declared as being throwable from this method.java.lang.reflect.Constructor
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).java.lang.reflect.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).boolean
isConstructor()
Returns true if this is a constructor, false if method.Type
returnType()
Return the Type that is returned by this method.Signature
signature()
Return the signature of this method.-
Methods inherited from interface org.glassfish.pfl.dynamic.codegen.spi.MemberInfo
isAccessibleInContext, modifiers, myClassInfo, name
-
-
-
-
Method Detail
-
isConstructor
boolean isConstructor()
Returns true if this is a constructor, false if method.
-
returnType
Type returnType()
Return the Type that is returned by this method.
-
exceptions
java.util.List<Type> exceptions()
Return a list of all Exception types that are declared as being throwable from this method.
-
arguments
java.util.List<Variable> arguments()
Return a list of arguments for this method.
-
signature
Signature signature()
Return the signature of this method.
-
getMethod
java.lang.reflect.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).- Throws:
java.lang.IllegalStateException
- if isConstructor() is true.
-
getConstructor
java.lang.reflect.Constructor 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).- Throws:
java.lang.IllegalStateException
- if isConstructor() is false.
-
-