public static class MethodDescription.ForLoadedMethod extends MethodDescription.AbstractMethodDescription
MethodDescription.AbstractMethodDescription, MethodDescription.ForLoadedConstructor, MethodDescription.ForLoadedMethod, MethodDescription.Latent
ModifierReviewable.AbstractModifierReviewable
CONSTRUCTOR_INTERNAL_NAME
Constructor and Description |
---|
ForLoadedMethod(Method method)
Creates a new immutable method description for a loaded method.
|
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.
|
String |
getDescriptor()
Returns the descriptor of this byte code element.
|
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 |
isBridge()
Specifies if the modifier described by this object represents the bridge flag
|
boolean |
isConstructor()
Specifies if this method description represents a constructor.
|
boolean |
isSynthetic()
Specifies if the modifier described by this object is synthetic.
|
boolean |
isVarArgs()
Specifies if the modifier described by this object represents the var args flag.
|
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() |
equals, getParameterOffset, getStackSize, getUniqueSignature, hashCode, isOverridable, isVisibleTo
isAbstract, isAnnotation, isDeprecated, isEnum, isFinal, isInterface, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSuper, isSynchronized, isTransient, isVolatile
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isAbstract, isAnnotation, isDeprecated, isEnum, isFinal, isInterface, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSuper, isSynchronized, isTransient, isVolatile
getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByType
public ForLoadedMethod(Method method)
method
- The loaded method to be represented by this method description.public TypeDescription getDeclaringType()
DeclaredInType
null
if no such type exists.public TypeDescription getReturnType()
MethodDescription
public TypeList getParameterTypes()
MethodDescription
public Annotation[][] getParameterAnnotations()
MethodDescription
public TypeList getExceptionTypes()
MethodDescription
public boolean isVarArgs()
ModifierReviewable
isVarArgs
in interface ModifierReviewable
isVarArgs
in class ModifierReviewable.AbstractModifierReviewable
true
if the modifier described by this object represents the var args flag.public boolean isConstructor()
MethodDescription
true
if this method description represents a constructor.public boolean isBridge()
ModifierReviewable
isBridge
in interface ModifierReviewable
isBridge
in class ModifierReviewable.AbstractModifierReviewable
true
if the modifier described by this object represents the bridge flagpublic 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 String getName()
ByteCodeElement
public int getModifiers()
ModifierReviewable
public boolean isSynthetic()
ModifierReviewable
isSynthetic
in interface ModifierReviewable
isSynthetic
in class ModifierReviewable.AbstractModifierReviewable
true
if the modifier described by this object is synthetic.public String getInternalName()
ByteCodeElement
public String getDescriptor()
ByteCodeElement
getDescriptor
in interface ByteCodeElement
getDescriptor
in class MethodDescription.AbstractMethodDescription
public Annotation[] getDeclaredAnnotations()
public Annotation[] getAnnotations()
public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
Copyright © 2014. All rights reserved.