Package net.bytebuddy.dynamic
Class Transformer.ForMethod.TransformedMethod
- java.lang.Object
-
- net.bytebuddy.description.ModifierReviewable.AbstractBase
-
- net.bytebuddy.description.TypeVariableSource.AbstractBase
-
- net.bytebuddy.description.method.MethodDescription.AbstractBase
-
- net.bytebuddy.dynamic.Transformer.ForMethod.TransformedMethod
-
- All Implemented Interfaces:
AnnotationSource,ByteCodeElement,ByteCodeElement.TypeDependant<MethodDescription.InDefinedShape,MethodDescription.Token>,DeclaredByType,MethodDescription,ModifierReviewable,ModifierReviewable.ForFieldDescription,ModifierReviewable.ForMethodDescription,ModifierReviewable.ForParameterDescription,ModifierReviewable.ForTypeDefinition,ModifierReviewable.OfAbstraction,ModifierReviewable.OfByteCodeElement,ModifierReviewable.OfEnumeration,NamedElement,NamedElement.WithGenericName,NamedElement.WithRuntimeName,TypeVariableSource
- Enclosing class:
- Transformer.ForMethod
protected static class Transformer.ForMethod.TransformedMethod extends MethodDescription.AbstractBase
The transformed method.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classTransformer.ForMethod.TransformedMethod.AttachmentVisitorA visitor that attaches type variables based on the transformed method's type variables and the instrumented type.protected classTransformer.ForMethod.TransformedMethod.TransformedParameterA transformed method's parameter.protected classTransformer.ForMethod.TransformedMethod.TransformedParameterListA parameter list representing the transformed method's parameters.-
Nested classes/interfaces inherited from interface net.bytebuddy.description.annotation.AnnotationSource
AnnotationSource.Empty, AnnotationSource.Explicit
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.ByteCodeElement
ByteCodeElement.TypeDependant<T extends ByteCodeElement.TypeDependant<?,S>,S extends ByteCodeElement.Token<S>>
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.method.MethodDescription
MethodDescription.AbstractBase, MethodDescription.ForLoadedConstructor, MethodDescription.ForLoadedMethod, MethodDescription.InDefinedShape, MethodDescription.InGenericShape, MethodDescription.Latent, MethodDescription.SignatureToken, MethodDescription.Token, MethodDescription.TypeSubstituting, MethodDescription.TypeToken
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.ModifierReviewable
ModifierReviewable.AbstractBase, ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.NamedElement
NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.TypeVariableSource
TypeVariableSource.AbstractBase, TypeVariableSource.Visitor<T>
-
-
Field Summary
-
Fields inherited from interface net.bytebuddy.description.ByteCodeElement
NON_GENERIC_SIGNATURE
-
Fields inherited from interface net.bytebuddy.description.method.MethodDescription
CONSTRUCTOR_INTERNAL_NAME, TYPE_INITIALIZER_INTERNAL_NAME, TYPE_INITIALIZER_MODIFIER, UNDEFINED
-
Fields inherited from interface net.bytebuddy.description.ModifierReviewable
EMPTY_MASK
-
Fields inherited from interface net.bytebuddy.description.NamedElement
EMPTY_NAME, NO_NAME
-
Fields inherited from interface net.bytebuddy.description.TypeVariableSource
UNDEFINED
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTransformedMethod(TypeDescription instrumentedType, TypeDefinition declaringType, MethodDescription.Token token, MethodDescription.InDefinedShape methodDescription)Creates a new transformed method.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodDescription.InDefinedShapeasDefined()Returns this type dependant in its defined shape, i.e.AnnotationListgetDeclaredAnnotations()Returns a list of annotations that are declared by this instance.TypeDefinitiongetDeclaringType()Returns the declaring type of this instance.AnnotationValue<?,?>getDefaultValue()Returns the method's default annotation value ornullif no default value is defined for this method.TypeList.GenericgetExceptionTypes()Returns the exception types of the described method.java.lang.StringgetInternalName()Returns the internal internalName of this byte code element.intgetModifiers()Returns the modifier that is described by this object.ParameterList<?>getParameters()Returns a list of this method's parameters.TypeDescription.GenericgetReceiverType()Returns this methods receiver type.TypeDescription.GenericgetReturnType()Returns the return type of the described method.TypeList.GenericgetTypeVariables()Returns the type variables that are declared by this element.-
Methods inherited from class net.bytebuddy.description.method.MethodDescription.AbstractBase
accept, asSignatureToken, asToken, asTypeToken, equals, getActualModifiers, getActualModifiers, getActualModifiers, getActualName, getDefaultValue, getDescriptor, getEnclosingSource, getGenericSignature, getName, getStackSize, hashCode, isAccessibleTo, isBootstrap, isBootstrap, isBridgeCompatible, isConstructor, isDefaultMethod, isDefaultValue, isDefaultValue, isGenerified, isInvokableOn, isMethod, isSpecializableFor, isTypeInitializer, isVirtual, isVisibleTo, represents, represents, toGenericString, toString
-
Methods inherited from class net.bytebuddy.description.TypeVariableSource.AbstractBase
findVariable
-
Methods inherited from class net.bytebuddy.description.ModifierReviewable.AbstractBase
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
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable
getSyntheticState, isFinal, isSynthetic
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.ForMethodDescription
getMethodManifestation, getMethodStrictness, getSynchronizationState, isBridge, isNative, isStrict, isSynchronized, isVarArgs
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.OfAbstraction
isAbstract
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.OfByteCodeElement
getOwnership, getVisibility, isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
-
Methods inherited from interface net.bytebuddy.description.TypeVariableSource
findVariable
-
-
-
-
Constructor Detail
-
TransformedMethod
protected TransformedMethod(TypeDescription instrumentedType, TypeDefinition declaringType, MethodDescription.Token token, MethodDescription.InDefinedShape methodDescription)
Creates a new transformed method.- Parameters:
instrumentedType- The instrumented type for which this method is transformed.declaringType- The method's declaring type.token- The method representing the transformed method.methodDescription- The defined shape of the transformed method.
-
-
Method Detail
-
getTypeVariables
public TypeList.Generic getTypeVariables()
Description copied from interface:TypeVariableSourceReturns the type variables that are declared by this element.- Returns:
- The type variables that are declared by this element.
-
getReturnType
public TypeDescription.Generic getReturnType()
Description copied from interface:MethodDescriptionReturns the return type of the described method.- Returns:
- The return type of the described method.
-
getParameters
public ParameterList<?> getParameters()
Description copied from interface:MethodDescriptionReturns a list of this method's parameters.- Returns:
- A list of this method's parameters.
-
getExceptionTypes
public TypeList.Generic getExceptionTypes()
Description copied from interface:MethodDescriptionReturns the exception types of the described method.- Returns:
- The exception types of the described method.
-
getDeclaredAnnotations
public AnnotationList getDeclaredAnnotations()
Description copied from interface:AnnotationSourceReturns a list of annotations that are declared by this instance.- Returns:
- A list of declared annotations.
-
getInternalName
public java.lang.String getInternalName()
Description copied from interface:NamedElement.WithRuntimeNameReturns the internal internalName of this byte code element.- Returns:
- The internal internalName of this byte code element as used within the Java class file format.
-
getDeclaringType
public TypeDefinition getDeclaringType()
Description copied from interface:DeclaredByTypeReturns the declaring type of this instance.- Returns:
- The declaring type or
nullif no such type exists.
-
getModifiers
public int getModifiers()
Description copied from interface:ModifierReviewableReturns the modifier that is described by this object.- Returns:
- The modifier that is described by this object.
-
getDefaultValue
public AnnotationValue<?,?> getDefaultValue()
Description copied from interface:MethodDescriptionReturns the method's default annotation value ornullif no default value is defined for this method.- Returns:
- The method's default annotation value or
nullif no default value is defined for this method.
-
asDefined
public MethodDescription.InDefinedShape asDefined()
Description copied from interface:ByteCodeElement.TypeDependantReturns this type dependant in its defined shape, i.e. the form it is declared in and without its type variable's resolved.- Returns:
- This type dependant in its defined shape.
-
getReceiverType
public TypeDescription.Generic getReceiverType()
Description copied from interface:MethodDescriptionReturns this methods receiver type. A receiver type is undefined forstaticmethods wherenullis 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.- Returns:
- This method's (annotated) receiver type.
-
-