Class MethodDescription.Latent

    • Field Detail

      • declaringType

        private final TypeDescription declaringType
        The type that is declaring this method.
      • internalName

        private final java.lang.String internalName
        The internal name of this method.
      • modifiers

        private final int modifiers
        The modifiers of this method.
      • typeVariables

        private final java.util.List<? extends TypeVariableToken> typeVariables
        A tokenized list representing the method's type variables.
      • parameterTokens

        private final java.util.List<? extends ParameterDescription.Token> parameterTokens
        The parameter tokens describing this method.
      • exceptionTypes

        private final java.util.List<? extends TypeDescription.Generic> exceptionTypes
        This method's exception types.
      • declaredAnnotations

        private final java.util.List<? extends AnnotationDescription> declaredAnnotations
        The annotations of this method.
      • defaultValue

        private final AnnotationValue<?,​?> defaultValue
        The default value of this method or null if no default annotation value is defined.
      • receiverType

        private final TypeDescription.Generic receiverType
        The receiver type of this method or null if the receiver type is defined implicitly.
    • Constructor Detail

      • Latent

        public Latent​(TypeDescription declaringType,
                      MethodDescription.Token token)
        Creates a new latent method description. All provided types are attached to this instance before they are returned.
        Parameters:
        declaringType - The declaring type of the method.
        token - A token representing the method's shape.
      • Latent

        public Latent​(TypeDescription declaringType,
                      java.lang.String internalName,
                      int modifiers,
                      java.util.List<? extends TypeVariableToken> typeVariables,
                      TypeDescription.Generic returnType,
                      java.util.List<? extends ParameterDescription.Token> parameterTokens,
                      java.util.List<? extends TypeDescription.Generic> exceptionTypes,
                      java.util.List<? extends AnnotationDescription> declaredAnnotations,
                      AnnotationValue<?,​?> defaultValue,
                      TypeDescription.Generic receiverType)
        Creates a new latent method description. All provided types are attached to this instance before they are returned.
        Parameters:
        declaringType - The type that is declaring this method.
        internalName - The internal name of this method.
        modifiers - The modifiers of this method.
        typeVariables - The type variables of the described method.
        returnType - The return type of this method.
        parameterTokens - The parameter tokens describing this method.
        exceptionTypes - This method's exception types.
        declaredAnnotations - The annotations of this method.
        defaultValue - The default value of this method or null if no default annotation value is defined.
        receiverType - The receiver type of this method or null if the receiver type is defined implicitly.
    • Method Detail

      • getTypeVariables

        public TypeList.Generic getTypeVariables()
        Returns the type variables that are declared by this element.
        Returns:
        The type variables that are declared by this element.
      • getReturnType

        public TypeDescription.Generic getReturnType()
        Returns the return type of the described method.
        Returns:
        The return type of the described method.
      • getExceptionTypes

        public TypeList.Generic getExceptionTypes()
        Returns the exception types of the described method.
        Returns:
        The exception types of the described method.
      • getDeclaredAnnotations

        public AnnotationList getDeclaredAnnotations()
        Returns a list of annotations that are declared by this instance.
        Returns:
        A list of declared annotations.
      • getInternalName

        public java.lang.String getInternalName()
        Returns 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 TypeDescription getDeclaringType()
        Returns the declaring type of this instance.
        Returns:
        The declaring type or null if no such type exists.
      • getModifiers

        public int getModifiers()
        Returns the modifier that is described by this object.
        Returns:
        The modifier that is described by this object.
      • getDefaultValue

        public AnnotationValue<?,​?> getDefaultValue()
        Returns the method's default annotation value or null if no default value is defined for this method.
        Returns:
        The method's default annotation value or null if no default value is defined for this method.
      • 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.