protected class InstrumentedType.AbstractBase.MethodToken extends MethodDescription.AbstractMethodDescription
MethodDescription.AbstractMethodDescription, MethodDescription.ForLoadedConstructor, MethodDescription.ForLoadedMethod, MethodDescription.LatentModifierReviewable.AbstractModifierReviewableCONSTRUCTOR_INTERNAL_NAME, TYPE_INITIALIZER_INTERNAL_NAME, TYPE_INITIALIZER_MODIFIER| Constructor and Description |
|---|
MethodToken(String internalName,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
List<? extends TypeDescription> exceptionTypes,
int modifiers)
Creates a new method or constructor for the enclosing instrumented type.
|
| Modifier and Type | Method and Description |
|---|---|
AnnotationList |
getDeclaredAnnotations()
Returns a list of annotations that are declared by this instance.
|
TypeDescription |
getDeclaringType()
Returns the declaring type of this instance.
|
Object |
getDefaultValue()
Returns the default value of this method or
null if no such value exists. |
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.
|
List<AnnotationList> |
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 |
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.
|
equals, getAdjustedModifiers, getDefaultValue, getDescriptor, getGenericSignature, getName, getParameterOffset, getSourceCodeName, getStackSize, getUniqueSignature, hashCode, isDefaultMethod, isMethod, isOverridable, isSpecializableFor, isVisibleTo, toStringisAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSuper, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatileclone, finalize, getClass, notify, notifyAll, wait, wait, waitisAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSuper, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatilepublic MethodToken(String internalName, TypeDescription returnType, List<? extends TypeDescription> parameterTypes, List<? extends TypeDescription> exceptionTypes, int modifiers)
internalName - The internal internalName of the method or constructor.returnType - A description of the return type of this method.parameterTypes - A list of descriptions of the parameter types of this method.exceptionTypes - A list of descriptions of the exception types that are declared by this method.modifiers - The modifiers of this method.public TypeDescription getReturnType()
MethodDescriptionpublic TypeList getParameterTypes()
MethodDescriptionpublic TypeList getExceptionTypes()
MethodDescriptionpublic boolean isConstructor()
MethodDescriptiontrue if this method description represents a constructor.public boolean isTypeInitializer()
MethodDescriptiontrue if this method description represents a type initializer.public boolean represents(Method method)
MethodDescriptionmethod - The method to be checked.true if this method description represents the given loaded method.public boolean represents(Constructor<?> constructor)
MethodDescriptionconstructor - The constructor to be checked.true if this method description represents the given loaded constructor.public List<AnnotationList> getParameterAnnotations()
MethodDescriptionpublic AnnotationList getDeclaredAnnotations()
AnnotatedElementpublic String getInternalName()
ByteCodeElementpublic TypeDescription getDeclaringType()
DeclaredInTypenull if no such type exists.public int getModifiers()
ModifierReviewablepublic Object getDefaultValue()
MethodDescriptionnull 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
AnnotationDescription.EnumerationValues.null.Copyright © 2014. All rights reserved.