Class TypeName.BuilderBase.TypeNameImpl

All Implemented Interfaces:
Prototype.Api, TypeName, Comparable<TypeName>
Enclosing class:
TypeName.BuilderBase<BUILDER extends TypeName.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends TypeName>

protected static class TypeName.BuilderBase.TypeNameImpl extends Object implements TypeName
Generated implementation of the prototype, can be extended by descendant prototype implementations.
  • Constructor Details

    • TypeNameImpl

      protected TypeNameImpl(TypeName.BuilderBase<?,?> builder)
      Create an instance providing a builder.
      builder - extending builder base of this prototype
  • Method Details

    • compareTo

      public int compareTo(TypeName o)
      Specified by:
      compareTo in interface Comparable<TypeName>
    • boxed

      public TypeName boxed()
      Description copied from interface: TypeName
      Return the boxed equivalent of this type. If this is not a primitive type, returns this instance.
      Specified by:
      boxed in interface TypeName
      boxed type for this type, or this type if not primitive
    • toString

      public String toString()
      toString in class Object
    • name

      public String name()
    • genericTypeName

      public TypeName genericTypeName()
      Description copied from interface: TypeName
      The base generic type name, stripped of any TypeNameBlueprint.typeArguments(). This is equivalent to the type name represented by
      Specified by:
      genericTypeName in interface TypeName
      based generic type name
    • fqName

      public String fqName()
    • resolvedName

      public String resolvedName()
    • packageName

      public String packageName()
    • className

      public String className()
    • enclosingNames

      public List<String> enclosingNames()
    • primitive

      public boolean primitive()
    • array

      public boolean array()
    • generic

      public boolean generic()
    • wildcard

      public boolean wildcard()
    • typeArguments

      public List<TypeName> typeArguments()
    • typeParameters

      public List<String> typeParameters()
    • equals

      public boolean equals(Object o)
      equals in class Object
    • hashCode

      public int hashCode()
      hashCode in class Object
    • classNameWithEnclosingNames

      default String classNameWithEnclosingNames()
      Class name with enclosing types, separated by .. If we have an inner class Builder of class Type, this method would return Type.Builder.
      class name with enclosing types
    • isList

      default boolean isList()
      Indicates whether this type is a java.util.List.
      if this is a list
    • isSet

      default boolean isSet()
      Indicates whether this type is a java.util.Set.
      if this is a set
    • isMap

      default boolean isMap()
      Indicates whether this type is a java.util.Map.
      if this is a map
    • isOptional

      default boolean isOptional()
      Indicates whether this type is a java.util.Optional.
      if this is an optional
    • isSupplier

      default boolean isSupplier()
      Indicates whether this type is a Supplier.
      if this is a supplier
    • classNameWithTypes

      default String classNameWithTypes()
      Simple class name with generic declaration (if part of this name).
      class name with generics, such as Consumer<java.lang.String>, or Consumer<T>
    • declaredName

      default String declaredName()
      Typically used as part of code-gen, when ".class" is tacked onto the suffix of what this returns.
      same as getName() unless the type is an array, and then will add "[]" to the return