Class MethodDescription.InDefinedShape.AbstractBase.ForLoadedExecutable<T extends AnnotatedElement>

Type Parameters:
T - The type of the executable.
All Implemented Interfaces:
AnnotationSource, ByteCodeElement, ByteCodeElement.Member, 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.
  • Field Details

  • Constructor Details

    • ForLoadedExecutable

      protected ForLoadedExecutable(T executable)
      Creates a new method description for a loaded executable.
      Parameters:
      executable - The represented java.lang.reflect.Executable.
  • Method Details

    • doPrivileged

      @Enhance private static <T> T doPrivileged(PrivilegedAction<T> action)
      A proxy for java.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

      public TypeDescription.Generic getReceiverType()
      Returns this methods receiver type. A receiver type is undefined for 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.
      Specified by:
      getReceiverType in interface MethodDescription
      Overrides:
      getReceiverType in class MethodDescription.InDefinedShape.AbstractBase
      Returns:
      This method's (annotated) receiver type.