public interface MethodDescription extends TypeVariableSource, NamedElement.WithGenericName, ByteCodeElement.TypeDependant<MethodDescription.InDefinedShape,MethodDescription.Token>
equal(Object) and hashCode() implementations.| Modifier and Type | Interface and Description | 
|---|---|
| static class  | MethodDescription.AbstractBaseAn abstract base implementation of a method description. | 
| static class  | MethodDescription.ForLoadedConstructorAn implementation of a method description for a loaded constructor. | 
| static class  | MethodDescription.ForLoadedMethodAn implementation of a method description for a loaded method. | 
| static interface  | MethodDescription.InDefinedShapeRepresents a method in its defined shape, i.e. | 
| static class  | MethodDescription.LatentA latent method description describes a method that is not attached to a declaring
  TypeDescription. | 
| static class  | MethodDescription.TokenA token that represents a method's shape. | 
| static class  | MethodDescription.TypeSubstitutingA method description that represents a given method but with substituted method types. | 
| static class  | MethodDescription.TypeTokenA token representing a method's erased return and parameter types. | 
TypeVariableSource.Visitor<T>ByteCodeElement.Accessible, ByteCodeElement.TypeDependant<T extends ByteCodeElement.TypeDependant<?,S>,S extends ByteCodeElement.Token<S>>NamedElement.WithGenericName, NamedElement.WithRuntimeName| Modifier and Type | Field and Description | 
|---|---|
| static String | CONSTRUCTOR_INTERNAL_NAMEThe internal name of a Java constructor. | 
| static Object | NO_DEFAULT_VALUERepresents a non-defined default value of an annotation property. | 
| static String | TYPE_INITIALIZER_INTERNAL_NAMEThe internal name of a Java static initializer. | 
| static int | TYPE_INITIALIZER_MODIFIERThe type initializer of any representation of a type initializer. | 
| static MethodDescription | UNDEFINEDRepresents any undefined property of a type description that is instead represented as  nullin order
 to resemble the Java reflection API which returnsnulland is intuitive to many Java developers. | 
NON_GENERIC_SIGNATUREEMPTY_NAMEEMPTY_MASK| Modifier and Type | Method and Description | 
|---|---|
| MethodDescription.TypeToken | asTypeToken()Returns a type token that represents this method's raw return and parameter types. | 
| int | getAdjustedModifiers(boolean nonAbstract)Returns this method modifier but adjusts its state of being abstract. | 
| Object | getDefaultValue()Returns the default value of this method or  nullif no such value exists. | 
| <T> T | getDefaultValue(Class<T> type)Returns the default value but casts it to the given type. | 
| GenericTypeList | getExceptionTypes()Returns the exception types of the described method. | 
| ParameterList<?> | getParameters()Returns a list of this method's parameters. | 
| GenericTypeDescription | getReturnType()Returns the return type of the described method. | 
| int | getStackSize()Returns the size of the local variable array that is required for this method, i.e. | 
| boolean | isBootstrap()Checks if the method is a bootstrap method. | 
| boolean | isBootstrap(List<?> arguments)Checks if the method is a bootstrap method that accepts the given arguments. | 
| boolean | isConstructor()Checks if this method description represents a constructor. | 
| boolean | isDefaultMethod()Checks if this method represents a Java 8+ default method. | 
| boolean | isDefaultValue()Checks if this method is capable of defining a default annotation value. | 
| boolean | isDefaultValue(Object value)Checks if the given value can describe a default annotation value for this method. | 
| boolean | isInvokableOn(TypeDescription typeDescription)Asserts if this method is invokable on an instance of the given type, i.e. | 
| boolean | isMethod()Checks if this method description represents a method, i.e. | 
| boolean | isSpecializableFor(TypeDescription typeDescription)Checks if this method can be called using the  INVOKESPECIALfor a given type. | 
| boolean | isTypeInitializer()Checks if this method is a type initializer. | 
| boolean | isVirtual()Verifies if this method describes a virtual method, i.e. | 
| boolean | represents(Constructor<?> constructor)Verifies if a method description represents a given loaded constructor. | 
| boolean | represents(Method method)Verifies if a method description represents a given loaded method. | 
accept, findVariable, getEnclosingSource, getTypeVariablesgetDescriptor, getGenericSignature, isVisibleTogetInternalName, getNamegetSourceCodeNamegetModifiers, isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSuper, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatilegetDeclaringTypegetDeclaredAnnotationstoGenericStringasDefined, asToken, asTokenstatic final String CONSTRUCTOR_INTERNAL_NAME
static final String TYPE_INITIALIZER_INTERNAL_NAME
static final int TYPE_INITIALIZER_MODIFIER
static final Object NO_DEFAULT_VALUE
static final MethodDescription UNDEFINED
null in order
 to resemble the Java reflection API which returns null and is intuitive to many Java developers.GenericTypeDescription getReturnType()
ParameterList<?> getParameters()
GenericTypeList getExceptionTypes()
int getAdjustedModifiers(boolean nonAbstract)
nonAbstract - true if the method should be treated as non-abstract.boolean isConstructor()
true if this method description represents a constructor.boolean isMethod()
true if this method description represents a method.boolean isTypeInitializer()
true if this method description represents a type initializer.boolean represents(Method method)
method - The method to be checked.true if this method description represents the given loaded method.boolean represents(Constructor<?> constructor)
constructor - The constructor to be checked.true if this method description represents the given loaded constructor.boolean isVirtual()
true if this method is virtual.int getStackSize()
this if this method represented a non-static
 method.boolean isDefaultMethod()
true if this method is a default method.boolean isSpecializableFor(TypeDescription typeDescription)
INVOKESPECIAL for a given type.typeDescription - The type otrue if this method can be called using the INVOKESPECIAL instruction
 using the given type.Object getDefaultValue()
null if no such value exists. The returned values might be
 of a different type than usual:
 Class values are represented as
 TypeDescriptions.Annotation values are represented as
 AnnotationDescriptionsEnum values are represented as
 EnumerationDescriptions.null.<T> T getDefaultValue(Class<T> type)
ClassCastException is thrown.T - The type to cast the default value to.type - The type to cast the default value to.boolean isInvokableOn(TypeDescription typeDescription)
typeDescription - The type to check.true if this method is invokable on an instance of the given type.boolean isBootstrap()
true if the method is a bootstrap method.boolean isBootstrap(List<?> arguments)
arguments - The arguments that the bootstrap method is expected to accept where primitive values
                  are to be represented as their wrapper types, loaded types by TypeDescription,
                  method handles by JavaInstance.MethodHandle instances and
                  method types by JavaInstance.MethodType instances.true if the method is a bootstrap method that accepts the given arguments.boolean isDefaultValue()
true if it is possible to define a default annotation value for this method.boolean isDefaultValue(Object value)
value - The value that describes the default annotation value for this method.true if the given value can describe a default annotation value for this method.MethodDescription.TypeToken asTypeToken()
Copyright © 2014–2015. All rights reserved.