Package net.bytebuddy.description.method
Class MethodDescription.InDefinedShape.AbstractBase.ForLoadedExecutable<T extends AnnotatedElement>
java.lang.Object
net.bytebuddy.description.ModifierReviewable.AbstractBase
net.bytebuddy.description.TypeVariableSource.AbstractBase
net.bytebuddy.description.method.MethodDescription.AbstractBase
net.bytebuddy.description.method.MethodDescription.InDefinedShape.AbstractBase
net.bytebuddy.description.method.MethodDescription.InDefinedShape.AbstractBase.ForLoadedExecutable<T>
- Type Parameters:
T
- The type of the executable.
- All Implemented Interfaces:
AnnotationSource
,ByteCodeElement
,ByteCodeElement.TypeDependant<MethodDescription.InDefinedShape,
,MethodDescription.Token> DeclaredByType
,DeclaredByType.WithMandatoryDeclaration
,MethodDescription
,MethodDescription.InDefinedShape
,ModifierReviewable
,ModifierReviewable.ForFieldDescription
,ModifierReviewable.ForMethodDescription
,ModifierReviewable.ForParameterDescription
,ModifierReviewable.ForTypeDefinition
,ModifierReviewable.OfAbstraction
,ModifierReviewable.OfByteCodeElement
,ModifierReviewable.OfEnumeration
,NamedElement
,NamedElement.WithDescriptor
,NamedElement.WithGenericName
,NamedElement.WithRuntimeName
,TypeVariableSource
- Direct Known Subclasses:
MethodDescription.ForLoadedConstructor
,MethodDescription.ForLoadedMethod
- Enclosing class:
- MethodDescription.InDefinedShape.AbstractBase
protected abstract static class MethodDescription.InDefinedShape.AbstractBase.ForLoadedExecutable<T extends AnnotatedElement>
extends MethodDescription.InDefinedShape.AbstractBase
A base implementation for a loaded instance representation for a
java.lang.reflect.Executable
.-
Nested Class Summary
Nested classes/interfaces inherited from class net.bytebuddy.description.method.MethodDescription.InDefinedShape.AbstractBase
MethodDescription.InDefinedShape.AbstractBase.Executable, MethodDescription.InDefinedShape.AbstractBase.ForLoadedExecutable<T extends AnnotatedElement>
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.DeclaredByType
DeclaredByType.WithMandatoryDeclaration
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.method.MethodDescription.InDefinedShape
MethodDescription.InDefinedShape.AbstractBase
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.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName
Nested classes/interfaces inherited from interface net.bytebuddy.description.TypeVariableSource
TypeVariableSource.AbstractBase, TypeVariableSource.Visitor<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final T
The representedjava.lang.reflect.Executable
.protected static final MethodDescription.InDefinedShape.AbstractBase.Executable
A dispatcher for interacting withjava.lang.reflect.Executable
.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.NamedElement.WithDescriptor
NON_GENERIC_SIGNATURE
Fields inherited from interface net.bytebuddy.description.TypeVariableSource
UNDEFINED
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ForLoadedExecutable
(T executable) Creates a new method description for a loaded executable. -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> T
doPrivileged
(PrivilegedAction<T> action) A proxy forjava.security.AccessController#doPrivileged
that is activated if available.Returns this methods receiver type.Methods inherited from class net.bytebuddy.description.method.MethodDescription.InDefinedShape.AbstractBase
asDefined
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, isBridgeCompatible, isConstantBootstrap, isConstantBootstrap, isConstructor, isDefaultMethod, isDefaultValue, isDefaultValue, isGenerified, isInferrable, isInvokableOn, isInvokeBootstrap, isInvokeBootstrap, isMethod, isSpecializableFor, isTypeInitializer, isVirtual, isVisibleTo, represents, represents, toGenericString, toString
Methods inherited from class net.bytebuddy.description.TypeVariableSource.AbstractBase
findExpectedVariable, 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.annotation.AnnotationSource
getDeclaredAnnotations
Methods inherited from interface net.bytebuddy.description.ByteCodeElement
isAccessibleTo, isVisibleTo
Methods inherited from interface net.bytebuddy.description.ByteCodeElement.TypeDependant
asToken
Methods inherited from interface net.bytebuddy.description.method.MethodDescription
asSignatureToken, asTypeToken, getActualModifiers, getActualModifiers, getActualModifiers, getDefaultValue, getDefaultValue, getExceptionTypes, getReturnType, getStackSize, isBridgeCompatible, isConstantBootstrap, isConstantBootstrap, isConstructor, isDefaultMethod, isDefaultValue, isDefaultValue, isInvokableOn, isInvokeBootstrap, isInvokeBootstrap, isMethod, isSpecializableFor, isTypeInitializer, isVirtual, represents, represents
Methods inherited from interface net.bytebuddy.description.method.MethodDescription.InDefinedShape
getDeclaringType, getParameters
Methods inherited from interface net.bytebuddy.description.ModifierReviewable
getModifiers, 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.NamedElement
getActualName
Methods inherited from interface net.bytebuddy.description.NamedElement.WithDescriptor
getDescriptor, getGenericSignature
Methods inherited from interface net.bytebuddy.description.NamedElement.WithGenericName
toGenericString
Methods inherited from interface net.bytebuddy.description.NamedElement.WithRuntimeName
getInternalName, getName
Methods inherited from interface net.bytebuddy.description.TypeVariableSource
accept, findExpectedVariable, findVariable, getEnclosingSource, getTypeVariables, isGenerified, isInferrable
-
Field Details
-
EXECUTABLE
A dispatcher for interacting withjava.lang.reflect.Executable
. -
executable
The representedjava.lang.reflect.Executable
.
-
-
Constructor Details
-
ForLoadedExecutable
Creates a new method description for a loaded executable.- Parameters:
executable
- The representedjava.lang.reflect.Executable
.
-
-
Method Details
-
doPrivileged
A proxy forjava.security.AccessController#doPrivileged
that is activated if available.- Type Parameters:
T
- The type of the action's resolved value.- Parameters:
action
- The action to execute from a privileged context.- Returns:
- The action's resolved value.
-
getReceiverType
Returns this methods receiver type. A receiver type is undefined forstatic
methods wherenull
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.- Specified by:
getReceiverType
in interfaceMethodDescription
- Overrides:
getReceiverType
in classMethodDescription.InDefinedShape.AbstractBase
- Returns:
- This method's (annotated) receiver type.
-