public abstract static class MethodDescription.AbstractMethodDescription extends ModifierReviewable.AbstractModifierReviewable implements MethodDescription
MethodDescription.AbstractMethodDescription, MethodDescription.ForLoadedConstructor, MethodDescription.ForLoadedMethod, MethodDescription.LatentModifierReviewable.AbstractModifierReviewableCONSTRUCTOR_INTERNAL_NAME, TYPE_INITIALIZER_INTERNAL_NAME, TYPE_INITIALIZER_MODIFIER| Constructor and Description |
|---|
AbstractMethodDescription() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
int |
getAdjustedModifiers(boolean nonAbstract)
Returns this method modifier but adjusts its state of being abstract.
|
<T> T |
getDefaultValue(Class<T> type)
Returns the default value but casts it to the given type.
|
String |
getDescriptor()
Returns the descriptor of this byte code element.
|
String |
getGenericSignature()
Returns the generic signature of this byte code element.
|
String |
getName()
Returns the internalName of this byte code element.
|
int |
getParameterOffset(int parameterIndex)
Returns the offset of the parameter at
parameterIndex on the described method's local variable array. |
String |
getSourceCodeName()
Returns the name of this byte code element as it is defined in Java source code.
|
int |
getStackSize()
Returns the size of the local variable array that is required for this method, i.e.
|
String |
getUniqueSignature()
Returns the unique signature of a byte code method.
|
int |
hashCode() |
boolean |
isDefaultMethod()
Checks if this method represents a Java 8+ default method.
|
boolean |
isMethod()
Checks if this method description represents a method, i.e.
|
boolean |
isOverridable()
Verifies if this method description represents an overridable method.
|
boolean |
isSpecializableFor(TypeDescription targetType)
Checks if this method can be called using the
INVOKESPECIAL for a given type. |
boolean |
isVisibleTo(TypeDescription typeDescription)
Checks if this element is visible from a given type.
|
String |
toString() |
isAbstract, 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, waitgetDefaultValue, getExceptionTypes, getParameterAnnotations, getParameterTypes, getReturnType, isConstructor, isTypeInitializer, represents, representsgetInternalNamegetModifiers, isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSuper, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatilegetDeclaringTypegetDeclaredAnnotationspublic String getUniqueSignature()
MethodDescriptiongetUniqueSignature in interface MethodDescriptionpublic int getStackSize()
MethodDescriptionthis if this method represented a non-static
method.getStackSize in interface MethodDescriptionpublic boolean isMethod()
MethodDescriptionisMethod in interface MethodDescriptiontrue if this method description represents a method.public String getName()
NamedElementgetName in interface NamedElementpublic String getSourceCodeName()
ByteCodeElementNamedElement.getName().getSourceCodeName in interface ByteCodeElementpublic String getDescriptor()
ByteCodeElementgetDescriptor in interface ByteCodeElementpublic String getGenericSignature()
ByteCodeElementgetGenericSignature in interface ByteCodeElementnull if this element is not generic.public int getAdjustedModifiers(boolean nonAbstract)
MethodDescriptiongetAdjustedModifiers in interface MethodDescriptionnonAbstract - true if the method should be treated as non-abstract.public boolean isVisibleTo(TypeDescription typeDescription)
ByteCodeElementisVisibleTo in interface ByteCodeElementtypeDescription - The type which is checked for its access of this element.true if this element is visible for typeDescription.public boolean isOverridable()
MethodDescriptionisOverridable in interface MethodDescriptiontrue if this method description represents an overridable method.public int getParameterOffset(int parameterIndex)
MethodDescriptionparameterIndex on the described method's local variable array.getParameterOffset in interface MethodDescriptionparameterIndex - The parameter index of interest.public boolean isDefaultMethod()
MethodDescriptionisDefaultMethod in interface MethodDescriptiontrue if this method is a default method.public boolean isSpecializableFor(TypeDescription targetType)
MethodDescriptionINVOKESPECIAL for a given type.isSpecializableFor in interface MethodDescriptiontargetType - The type otrue if this method can be called using the INVOKESPECIAL instruction
using the given type.public <T> T getDefaultValue(Class<T> type)
MethodDescriptionClassCastException is thrown.getDefaultValue in interface MethodDescriptionT - The type to cast the default value to.type - The type to cast the default value to.Copyright © 2014. All rights reserved.