public static class MethodDescription.TypeSubstituting extends MethodDescription.AbstractBase implements MethodDescription.InGenericShape
MethodDescription.AbstractBase, MethodDescription.ForLoadedConstructor, MethodDescription.ForLoadedMethod, MethodDescription.InDefinedShape, MethodDescription.InGenericShape, MethodDescription.Latent, MethodDescription.SignatureToken, MethodDescription.Token, MethodDescription.TypeSubstituting, MethodDescription.TypeToken
TypeVariableSource.Visitor<T>
ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration
ByteCodeElement.TypeDependant<T extends ByteCodeElement.TypeDependant<?,S>,S extends ByteCodeElement.Token<S>>
NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName
AnnotationSource.Empty, AnnotationSource.Explicit
CONSTRUCTOR_INTERNAL_NAME, TYPE_INITIALIZER_INTERNAL_NAME, TYPE_INITIALIZER_MODIFIER, UNDEFINED
EMPTY_MASK
NON_GENERIC_SIGNATURE
EMPTY_NAME, NO_NAME
Constructor and Description |
---|
TypeSubstituting(TypeDescription.Generic declaringType,
MethodDescription methodDescription,
TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
Creates a method description with substituted method types.
|
Modifier and Type | Method and Description |
---|---|
MethodDescription.InDefinedShape |
asDefined()
Returns this type dependant in its defined shape, i.e.
|
AnnotationList |
getDeclaredAnnotations()
Returns a list of annotations that are declared by this instance.
|
TypeDescription.Generic |
getDeclaringType()
Returns the declaring type of this instance.
|
AnnotationValue<?,?> |
getDefaultValue()
Returns the method's default annotation value or
null if no default value is defined for this method. |
TypeList.Generic |
getExceptionTypes()
Returns the exception types of the described method.
|
String |
getInternalName()
Returns the internal internalName of this byte code element.
|
int |
getModifiers()
Returns the modifier that is described by this object.
|
ParameterList<ParameterDescription.InGenericShape> |
getParameters()
Returns a list of this method's parameters.
|
TypeDescription.Generic |
getReceiverType()
Returns this methods receiver type.
|
TypeDescription.Generic |
getReturnType()
Returns the return type of the described method.
|
TypeList.Generic |
getTypeVariables()
Returns the type variables that are declared by this element.
|
boolean |
isConstructor()
Checks if this method description represents a constructor.
|
boolean |
isMethod()
Checks if this method description represents a method, i.e.
|
boolean |
isTypeInitializer()
Checks if this method is a type initializer.
|
accept, asSignatureToken, asToken, asTypeToken, equals, getActualModifiers, getActualModifiers, getActualModifiers, getActualName, getDefaultValue, getDescriptor, getEnclosingSource, getGenericSignature, getName, getStackSize, hashCode, isAccessibleTo, isBootstrap, isBootstrap, isBridgeCompatible, isDefaultMethod, isDefaultValue, isDefaultValue, isGenerified, isInvokableOn, isSpecializableFor, isVirtual, isVisibleTo, represents, represents, toGenericString, toString
findVariable
getEnumerationState, getFieldManifestation, getFieldPersistence, getMethodManifestation, getMethodStrictness, getOwnership, getParameterManifestation, getProvisioningState, getSynchronizationState, getSyntheticState, getTypeManifestation, getVisibility, isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatile
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
asSignatureToken, asTypeToken, getActualModifiers, getActualModifiers, getActualModifiers, getDefaultValue, getStackSize, isBootstrap, isBootstrap, isBridgeCompatible, isDefaultMethod, isDefaultValue, isDefaultValue, isInvokableOn, isSpecializableFor, isVirtual, represents, represents
accept, findVariable, getEnclosingSource, isGenerified
getMethodManifestation, getMethodStrictness, getSynchronizationState, isBridge, isNative, isStrict, isSynchronized, isVarArgs
isAbstract
getOwnership, getVisibility, isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
getSyntheticState, isFinal, isSynthetic
toGenericString
getDescriptor, getGenericSignature, isAccessibleTo, isVisibleTo
getName
getActualName
asToken
public TypeSubstituting(TypeDescription.Generic declaringType, MethodDescription methodDescription, TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
declaringType
- The type that is declaring the substituted method.methodDescription
- The represented method description.visitor
- A visitor that is applied to the method type.public TypeDescription.Generic getReturnType()
MethodDescription
getReturnType
in interface MethodDescription
public TypeList.Generic getTypeVariables()
TypeVariableSource
getTypeVariables
in interface TypeVariableSource
public ParameterList<ParameterDescription.InGenericShape> getParameters()
MethodDescription
getParameters
in interface MethodDescription
getParameters
in interface MethodDescription.InGenericShape
public TypeList.Generic getExceptionTypes()
MethodDescription
getExceptionTypes
in interface MethodDescription
public AnnotationValue<?,?> getDefaultValue()
MethodDescription
null
if no default value is defined for this method.getDefaultValue
in interface MethodDescription
null
if no default value is defined for this method.public TypeDescription.Generic getReceiverType()
MethodDescription
static
methods
where null
is returned. Other than a receiver type that is provided by the Java reflection
API, Byte Buddy is capable of extracting annotations on type parameters of receiver types when
directly accessing a class file. Therefore, a receiver type might be parameterized.getReceiverType
in interface MethodDescription
public AnnotationList getDeclaredAnnotations()
AnnotationSource
getDeclaredAnnotations
in interface AnnotationSource
public TypeDescription.Generic getDeclaringType()
DeclaredByType
getDeclaringType
in interface DeclaredByType
getDeclaringType
in interface MethodDescription.InGenericShape
null
if no such type exists.public int getModifiers()
ModifierReviewable
getModifiers
in interface ModifierReviewable
public String getInternalName()
NamedElement.WithRuntimeName
getInternalName
in interface NamedElement.WithRuntimeName
public MethodDescription.InDefinedShape asDefined()
ByteCodeElement.TypeDependant
asDefined
in interface ByteCodeElement.TypeDependant<MethodDescription.InDefinedShape,MethodDescription.Token>
public boolean isConstructor()
MethodDescription
isConstructor
in interface MethodDescription
isConstructor
in class MethodDescription.AbstractBase
true
if this method description represents a constructor.public boolean isMethod()
MethodDescription
isMethod
in interface MethodDescription
isMethod
in class MethodDescription.AbstractBase
true
if this method description represents a Java method.public boolean isTypeInitializer()
MethodDescription
isTypeInitializer
in interface MethodDescription
isTypeInitializer
in class MethodDescription.AbstractBase
true
if this method description represents a type initializer.Copyright © 2014–2018. All rights reserved.