Class GenericType.OfInnerClass

Enclosing class:
GenericType

public static final class GenericType.OfInnerClass extends GenericType.OfClass
A generic type corresponding to an inner class.

Note that static member classes are not inner classes and are represented by GenericType.OfRootClass.

  • Method Details

    • desc

      public ClassDesc desc()
      Description copied from class: GenericType
      Returns the erased type descriptor for this generic type (not null).
      Specified by:
      desc in class GenericType
      Returns:
      the erased type descriptor for this generic type (not null)
    • outerType

      public GenericType.OfClass outerType()
      Returns the enclosing class of this inner class.
      Returns:
      the enclosing class of this inner class
    • name

      public String name()
    • withOuterType

      public GenericType.OfInnerClass withOuterType(GenericType.OfClass outerType)
    • withAnnotations

      public GenericType.OfInnerClass withAnnotations(Consumer<AnnotatableCreator> builder)
      Description copied from class: GenericType
      Returns this generic type with annotations added by the given builder (not null).
      Overrides:
      withAnnotations in class GenericType.OfClass
      Parameters:
      builder - the annotation builder (must not be null)
      Returns:
      this generic type with annotations added by the given builder (not null)
    • withAnnotation

      public <A extends Annotation> GenericType.OfInnerClass withAnnotation(Class<A> annotationType)
      Description copied from class: GenericType
      Returns this generic type with the given additional annotation (not null).
      Overrides:
      withAnnotation in class GenericType.OfClass
      Parameters:
      annotationType - the annotation type (must not be null)
      Returns:
      this generic type with the given additional annotation (not null)
    • withAnnotation

      public <A extends Annotation> GenericType.OfInnerClass withAnnotation(Class<A> annotationType, Consumer<AnnotationCreator<A>> builder)
      Description copied from class: GenericType
      Returns this generic type with the given additional annotation (not null).
      Overrides:
      withAnnotation in class GenericType.OfClass
      Parameters:
      annotationType - the annotation type (must not be null)
      builder - the builder for the given annotation type (must not be null)
      Returns:
      this generic type with the given additional annotation (not null)
    • isRaw

      public boolean isRaw()
      Description copied from class: GenericType
      Returns true if this type has no type arguments, or false if it has type arguments.
      Overrides:
      isRaw in class GenericType.OfClass
      Returns:
      true if this type has no type arguments, or false if it has type arguments
    • hasVisibleAnnotations

      public boolean hasVisibleAnnotations()
      Description copied from class: GenericType
      Returns true if this type has runtime-visible type annotations, or false if it does not.
      Overrides:
      hasVisibleAnnotations in class GenericType.OfClass
      Returns:
      true if this type has runtime-visible type annotations, or false if it does not
    • hasInvisibleAnnotations

      public boolean hasInvisibleAnnotations()
      Description copied from class: GenericType
      Returns true if this type has runtime-invisible type annotations, or false if it does not.
      Overrides:
      hasInvisibleAnnotations in class GenericType.OfClass
      Returns:
      true if this type has runtime-invisible type annotations, or false if it does not
    • equals

      public boolean equals(GenericType.OfClass other)
      Description copied from class: GenericType.OfClass
      Returns true if this object is equal to the given object, or false if it is not.
      Overrides:
      equals in class GenericType.OfClass
      Returns:
      true if this object is equal to the given object, or false if it is not
    • equals

      public boolean equals(GenericType.OfInnerClass other)
      Returns true if this object is equal to the given object, or false if it is not.
      Returns:
      true if this object is equal to the given object, or false if it is not
    • hashCode

      public int hashCode()
      Description copied from class: GenericType
      Returns the hash code of this generic type.
      Overrides:
      hashCode in class GenericType.OfClass
      Returns:
      the hash code of this generic type
    • toString

      public StringBuilder toString(StringBuilder b)
      Description copied from class: GenericType
      Append a string representation of this type to the given string builder.
      Overrides:
      toString in class GenericType
      Parameters:
      b - the string builder (must not be null)
      Returns:
      the string builder that was passed in (not null)