public static class MethodLookupEngine.OverridenClassMethod extends MethodDescription.AbstractMethodDescription
MethodDescription.AbstractMethodDescription, MethodDescription.ForLoadedConstructor, MethodDescription.ForLoadedMethod, MethodDescription.Latent
ModifierReviewable.AbstractModifierReviewable
CONSTRUCTOR_INTERNAL_NAME, TYPE_INITIALIZER_INTERNAL_NAME, TYPE_INITIALIZER_MODIFIER
EMPTY_NAME
EMPTY_MASK
Modifier | Constructor and Description |
---|---|
protected |
OverridenClassMethod(List<MethodDescription> methodChain)
Creates a new overriding class method.
|
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.
|
String |
getName()
Returns the internalName of this byte code element.
|
ParameterList |
getParameters()
Returns a list of this method's parameters.
|
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 |
isSpecializableFor(TypeDescription targetType)
Checks if this method can be called using the
INVOKESPECIAL for a given type. |
boolean |
isTypeInitializer()
Checks if this method is a type initializer.
|
static MethodDescription |
of(MethodDescription overridingMethod,
MethodDescription overriddenMethod)
Creates a new method description of an overriding method to an overriden method.
|
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, getSourceCodeName, getStackSize, getUniqueSignature, hashCode, isBootstrap, isBootstrap, isDefaultMethod, isDefaultValue, isDefaultValue, isInvokableOn, isMethod, isOverridable, isVisibleTo, toString
isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, 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, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSuper, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatile
protected OverridenClassMethod(List<MethodDescription> methodChain)
methodChain
- A list of overridden methods starting with the most specific method going down to the
least specific.public static MethodDescription of(MethodDescription overridingMethod, MethodDescription overriddenMethod)
MethodLookupEngine.OverridenClassMethod
itself and is resolved appropriately.overridingMethod
- The most specific method that is overriding another method.overriddenMethod
- The method that is overridden by the overridingMethod
.public TypeDescription getReturnType()
MethodDescription
public ParameterList getParameters()
MethodDescription
public TypeList getExceptionTypes()
MethodDescription
public boolean isConstructor()
MethodDescription
isConstructor
in interface MethodDescription
isConstructor
in class MethodDescription.AbstractMethodDescription
true
if this method description represents a constructor.public boolean isTypeInitializer()
MethodDescription
isTypeInitializer
in interface MethodDescription
isTypeInitializer
in class MethodDescription.AbstractMethodDescription
true
if this method description represents a type initializer.public boolean represents(Method method)
MethodDescription
represents
in interface MethodDescription
represents
in class MethodDescription.AbstractMethodDescription
method
- The method to be checked.true
if this method description represents the given loaded method.public boolean represents(Constructor<?> constructor)
MethodDescription
represents
in interface MethodDescription
represents
in class MethodDescription.AbstractMethodDescription
constructor
- The constructor to be checked.true
if this method description represents the given loaded constructor.public String getName()
NamedElement
getName
in interface NamedElement
getName
in class MethodDescription.AbstractMethodDescription
public String getInternalName()
NamedElement
public TypeDescription getDeclaringType()
DeclaredInType
null
if no such type exists.public int getModifiers()
ModifierReviewable
public AnnotationList getDeclaredAnnotations()
AnnotatedCodeElement
public boolean isSpecializableFor(TypeDescription targetType)
MethodDescription
INVOKESPECIAL
for a given type.isSpecializableFor
in interface MethodDescription
isSpecializableFor
in class MethodDescription.AbstractMethodDescription
targetType
- The type otrue
if this method can be called using the INVOKESPECIAL
instruction
using the given type.public Object getDefaultValue()
MethodDescription
null
if no such value exists. The returned values might be
of a different type than usual:
Class
values are represented as
TypeDescription
s.Annotation
values are represented as
AnnotationDescription
sEnum
values are represented as
EnumerationDescription
s.null
.Copyright © 2014–2015. All rights reserved.