Class TypeName.BuilderBase.TypeNameImpl

java.lang.Object
io.helidon.common.types.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.
      Parameters:
      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
      Returns:
      boxed type for this type, or this type if not primitive
    • toString

      public String toString()
      Overrides:
      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 TypeNameBlueprint.name().
      Specified by:
      genericTypeName in interface TypeName
      Returns:
      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)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      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.
      Returns:
      class name with enclosing types
    • isList

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

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

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

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

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

      default String classNameWithTypes()
      Simple class name with generic declaration (if part of this name).
      Returns:
      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.
      Returns:
      same as getName() unless the type is an array, and then will add "[]" to the return