Class TypePool.Default.LazyTypeDescription

    • Constructor Detail

      • LazyTypeDescription

        protected LazyTypeDescription​(TypePool typePool,
                                      int actualModifiers,
                                      int modifiers,
                                      java.lang.String name,
                                      java.lang.String superClassInternalName,
                                      java.lang.String[] interfaceInternalName,
                                      java.lang.String genericSignature,
                                      TypePool.Default.LazyTypeDescription.TypeContainment typeContainment,
                                      java.lang.String declaringTypeInternalName,
                                      java.util.List<java.lang.String> declaredTypes,
                                      boolean anonymousType,
                                      java.util.Map<java.lang.Integer,​java.util.Map<java.lang.String,​java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> superTypeAnnotationTokens,
                                      java.util.Map<java.lang.Integer,​java.util.Map<java.lang.String,​java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> typeVariableAnnotationTokens,
                                      java.util.Map<java.lang.Integer,​java.util.Map<java.lang.Integer,​java.util.Map<java.lang.String,​java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>>> typeVariableBoundsAnnotationTokens,
                                      java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken> annotationTokens,
                                      java.util.List<TypePool.Default.LazyTypeDescription.FieldToken> fieldTokens,
                                      java.util.List<TypePool.Default.LazyTypeDescription.MethodToken> methodTokens)
        Creates a new lazy type description.
        Parameters:
        typePool - The type pool to be used for looking up linked types.
        actualModifiers - The actual modifiers of this type.
        modifiers - The modifiers of this type.
        name - The binary name of this type.
        superClassInternalName - The internal name of this type's super type or null if no such super type is defined.
        interfaceInternalName - An array of this type's interfaces or null if this type does not define any interfaces.
        genericSignature - The type's generic signature as found in the class file or null if the type is not generic.
        typeContainment - A definition of this type's containment within another type or method.
        declaringTypeInternalName - The internal name of this type's declaring type or null if no such type exists.
        declaredTypes - A list of descriptors representing the types that are declared by this type.
        anonymousType - true if this type is an anonymous type.
        superTypeAnnotationTokens - A mapping of type annotations for this type's super type and interface types by their indices.
        typeVariableAnnotationTokens - A mapping of type annotations of the type variables' type annotations by their indices.
        typeVariableBoundsAnnotationTokens - A mapping of type annotations of the type variables' bounds' type annotations by their indices and each variable's index.
        annotationTokens - A list of tokens that represent the annotations of this type.
        fieldTokens - A list of field tokens describing the field's of this type.
        methodTokens - A list of method tokens describing the method's of this type.
    • Method Detail

      • getEnclosingMethod

        public MethodDescription getEnclosingMethod()
        Description copied from interface: TypeDescription
        Returns a description of the method that encloses this type. If this method is not enclosed by any type or is enclosed by the type initializer, null is returned by this method.
        Returns:
        A description of the enclosing method of this type or null if there is no such method.
      • getEnclosingType

        public TypeDescription getEnclosingType()
        Description copied from interface: TypeDescription
        Returns a description of this type's enclosing type if any.
        Returns:
        A description of the enclosing type of this type or null if there is no such type.
      • getDeclaredTypes

        public TypeList getDeclaredTypes()
        Description copied from interface: TypeDescription
        Returns a list of types that are declared by this type excluding anonymous classes.
        Returns:
        A list of types that are declared within this type.
      • isAnonymousClass

        public boolean isAnonymousClass()
        Description copied from interface: TypeDescription
        Checks if this type description represents an anonymous type.
        Returns:
        true if this type description represents an anonymous type.
      • isLocalClass

        public boolean isLocalClass()
        Description copied from interface: TypeDescription
        Checks if this type description represents a local type.
        Returns:
        true if this type description represents a local type.
      • isMemberClass

        public boolean isMemberClass()
        Description copied from interface: TypeDescription
        Checks if this type description represents a member type.
        Returns:
        true if this type description represents a member type.
      • getPackage

        public PackageDescription getPackage()
        Description copied from interface: TypeDescription
        Returns the package internalName of the type described by this instance.
        Returns:
        The package internalName of the type described by this instance.
      • getName

        public java.lang.String getName()
        Description copied from interface: NamedElement.WithRuntimeName
        Returns the internalName of this byte code element.
        Returns:
        The internalName of this byte code element as visible from within a running Java application.
      • getDeclaringType

        public TypeDescription getDeclaringType()
        Description copied from interface: DeclaredByType
        Returns the declaring type of this instance.
        Returns:
        The declaring type or null if no such type exists.
      • getModifiers

        public int getModifiers()
        Description copied from interface: ModifierReviewable
        Returns the modifier that is described by this object.
        Returns:
        The modifier that is described by this object.
      • getActualModifiers

        public int getActualModifiers​(boolean superFlag)
        Description copied from interface: TypeDescription
        Returns the type's actual modifiers as present in the class file. For example, a type cannot be private. but it modifiers might reflect this property nevertheless if a class was defined as a private inner class. The returned modifiers take also into account if the type is marked as Deprecated. Anonymous classes that are enclosed in a static method or the type initializer are additionally marked as final as it is also done by the Java compiler.
        Specified by:
        getActualModifiers in interface TypeDescription
        Overrides:
        getActualModifiers in class TypeDescription.AbstractBase
        Parameters:
        superFlag - true if the modifier's super flag should be set.
        Returns:
        The type's actual modifiers.
      • getDeclaredAnnotations

        public AnnotationList getDeclaredAnnotations()
        Description copied from interface: AnnotationSource
        Returns a list of annotations that are declared by this instance.
        Returns:
        A list of declared annotations.
      • getTypeVariables

        public TypeList.Generic getTypeVariables()
        Description copied from interface: TypeVariableSource
        Returns the type variables that are declared by this element.
        Returns:
        The type variables that are declared by this element.
      • getGenericSignature

        public java.lang.String getGenericSignature()
        Description copied from interface: ByteCodeElement
        Returns the generic signature of this byte code element. If this element does not reference generic types or references malformed generic types, null is returned as a signature.
        Specified by:
        getGenericSignature in interface ByteCodeElement
        Overrides:
        getGenericSignature in class TypeDescription.AbstractBase
        Returns:
        The generic signature or null if this element is not generic.