Class GenericType.OfRootClass

Enclosing class:
GenericType

public static final class GenericType.OfRootClass extends GenericType.OfClass
A generic type corresponding to a "root" (non-inner) class. "Root" classes are top-level classes and static member classes.
  • Method Details

    • withArguments

      public GenericType.OfRootClass withArguments(List<TypeArgument> newArguments)
      Description copied from class: GenericType.OfClass
      Returns a copy of this generic type with the given type arguments.
      Overrides:
      withArguments in class GenericType.OfClass
      Parameters:
      newArguments - the new type arguments (must not be null)
      Returns:
      a copy of this generic type with the given type arguments
    • 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)
    • withAnnotations

      public GenericType.OfRootClass 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.OfRootClass 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.OfRootClass 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)
    • 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.OfRootClass 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)