public static class MethodDescription.Latent extends MethodDescription.AbstractMethodDescription
TypeDescription
.MethodDescription.AbstractMethodDescription, MethodDescription.ForLoadedConstructor, MethodDescription.ForLoadedMethod, MethodDescription.Latent
ModifierReviewable.AbstractModifierReviewable
CONSTRUCTOR_INTERNAL_NAME, TYPE_INITIALIZER_INTERNAL_NAME
Constructor and Description |
---|
Latent(String internalName,
TypeDescription declaringType,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
int modifiers,
List<? extends TypeDescription> exceptionTypes)
Creates an immutable latent method description.
|
Modifier and Type | Method and Description |
---|---|
<T extends Annotation> |
getAnnotation(Class<T> annotationClass) |
Annotation[] |
getAnnotations() |
Annotation[] |
getDeclaredAnnotations() |
TypeDescription |
getDeclaringType()
Returns the declaring type of this instance.
|
TypeList |
getExceptionTypes()
Returns a description of the exception types of the method described by this instance.
|
String |
getInternalName()
Returns the internal internalName of this byte code element.
|
int |
getModifiers()
Returns the modifier that is described by this object.
|
String |
getName()
Returns the internalName of this byte code element.
|
Annotation[][] |
getParameterAnnotations()
Returns the parameter annotations of the method described by this instance.
|
TypeList |
getParameterTypes()
Returns a list of type descriptions of the method described by this instance.
|
TypeDescription |
getReturnType()
Returns a description of the return type of the method described by this instance.
|
boolean |
isAnnotationPresent(Class<? extends Annotation> annotationClass) |
boolean |
isConstructor()
Checks if this method description represents a constructor.
|
boolean |
isTypeInitializer()
Checks if this method is a type initializer.
|
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.
|
String |
toString() |
static MethodDescription |
typeInitializerOf(TypeDescription declaringType)
Creates a latent method description of a type initializer (
<clinit> ) for a given type. |
equals, getAdjustedModifiers, getDescriptor, getGenericSignature, getParameterOffset, getStackSize, getUniqueSignature, hashCode, isDefaultMethod, isMethod, isOverridable, isSpecializableFor, isVisibleTo
isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSuper, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatile
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSuper, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatile
getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByType
public Latent(String internalName, TypeDescription declaringType, TypeDescription returnType, List<? extends TypeDescription> parameterTypes, int modifiers, List<? extends TypeDescription> exceptionTypes)
internalName
- The internal name of the method.declaringType
- The type that is declaring this method latently.returnType
- The return type of this method.parameterTypes
- The parameter types of this method.modifiers
- The modifiers of this method.exceptionTypes
- The exception types of this method.public static MethodDescription typeInitializerOf(TypeDescription declaringType)
<clinit>
) for a given type.declaringType
- The type that for which a type initializer should be created.public TypeDescription getReturnType()
MethodDescription
public TypeList getParameterTypes()
MethodDescription
public Annotation[][] getParameterAnnotations()
MethodDescription
public TypeList getExceptionTypes()
MethodDescription
public boolean isConstructor()
MethodDescription
true
if this method description represents a constructor.public boolean isTypeInitializer()
MethodDescription
true
if this method description represents a type initializer.public boolean represents(Method method)
MethodDescription
method
- The method to be checked.true
if this method description represents the given loaded method.public boolean represents(Constructor<?> constructor)
MethodDescription
constructor
- The constructor to be checked.true
if this method description represents the given loaded constructor.public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
public Annotation[] getAnnotations()
public Annotation[] getDeclaredAnnotations()
public String getName()
ByteCodeElement
public String getInternalName()
ByteCodeElement
public TypeDescription getDeclaringType()
DeclaredInType
null
if no such type exists.public int getModifiers()
ModifierReviewable
Copyright © 2014. All rights reserved.