Class TypeName.BuilderBase.TypeNameImpl

java.lang.Object
io.helidon.common.types.TypeName.BuilderBase.TypeNameImpl
All Implemented Interfaces:
Prototype.Api, Annotated, 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

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • packageName

      public String packageName()
      Description copied from interface: TypeName
      Functions similar to Class.getPackageName().
      Specified by:
      packageName in interface TypeName
      Returns:
      the package name, never null
    • className

      public String className()
      Description copied from interface: TypeName
      Functions similar to Class.getSimpleName().
      Specified by:
      className in interface TypeName
      Returns:
      the simple class name
    • enclosingNames

      public List<String> enclosingNames()
      Description copied from interface: TypeName
      Simple names of enclosing classes (if any exist). For example for type io.helidon.example.Type$NestOne$NestTwo, this would return a list of Type, NestOne.
      Specified by:
      enclosingNames in interface TypeName
      Returns:
      enclosing classes simple names
    • primitive

      public boolean primitive()
      Description copied from interface: TypeName
      Functions similar to Class.isPrimitive().
      Specified by:
      primitive in interface TypeName
      Returns:
      true if this type represents a primitive type
    • array

      public boolean array()
      Description copied from interface: TypeName
      Functions similar to Class.isArray().
      Specified by:
      array in interface TypeName
      Returns:
      true if this type represents a primitive array []
    • vararg

      public boolean vararg()
      Description copied from interface: TypeName
      If this is a representation of TypeName.array(), this method can identify that it was declared as a vararg. This may be used for method/constructor parameters (which is the only place this is supported in Java).
      Specified by:
      vararg in interface TypeName
      Returns:
      whether an array is declared as a vararg
    • generic

      public boolean generic()
      Description copied from interface: TypeName
      Indicates whether this type is using generics.
      Specified by:
      generic in interface TypeName
      Returns:
      used to represent a generic (e.g., "Optional<CB>")
    • wildcard

      public boolean wildcard()
      Description copied from interface: TypeName
      Indicates whether this type is using wildcard generics.
      Specified by:
      wildcard in interface TypeName
      Returns:
      used to represent a wildcard (e.g., "? extends SomeType")
    • typeArguments

      public List<TypeName> typeArguments()
      Description copied from interface: TypeName
      Returns the list of generic type arguments, or an empty list if no generics are in use.
      Specified by:
      typeArguments in interface TypeName
      Returns:
      the type arguments of this type, if this type supports generics/parameterized type
      See Also:
    • typeParameters

      public List<String> typeParameters()
      Description copied from interface: TypeName
      Type parameters associated with the type arguments. The type argument list may be empty, even if this list is not, for example in declaration of the top level type (as arguments are a function of usage of the type). if TypeName.typeArguments() exist, this list MUST exist and have the same size and order (it maps the name to the type).
      Specified by:
      typeParameters in interface TypeName
      Returns:
      type parameter names as declared on this type, or names that represent the TypeName.typeArguments()
    • lowerBounds

      public List<TypeName> lowerBounds()
      Description copied from interface: TypeName
      Generic types that provide keyword extends will have a lower bound defined. Each lower bound may be a real type, or another generic type.

      This list may only have value if this is a generic type.

      Specified by:
      lowerBounds in interface TypeName
      Returns:
      list of lower bounds of this type
      See Also:
    • upperBounds

      public List<TypeName> upperBounds()
      Description copied from interface: TypeName
      Generic types that provide keyword super will have an upper bound defined. Upper bound may be a real type, or another generic type.

      This list may only have value if this is a generic type.

      Specified by:
      upperBounds in interface TypeName
      Returns:
      list of upper bounds of this type
      See Also:
    • componentType

      public Optional<TypeName> componentType()
      Description copied from interface: TypeName
      Component type of array.
      Specified by:
      componentType in interface TypeName
      Returns:
      component type of array
    • annotations

      public List<Annotation> annotations()
      Description copied from interface: Annotated
      List of declared and known annotations for this element. Note that "known" implies that the annotation is visible, which depends upon the context in which it was build (such as the of the annotation).
      Specified by:
      annotations in interface Annotated
      Returns:
      the list of annotations declared on this element
    • inheritedAnnotations

      public List<Annotation> inheritedAnnotations()
      Description copied from interface: Annotated
      List of all inherited annotations for this element. Inherited annotations are annotations declared on annotations of this element that are also marked as Inherited.

      The returned list does not contain Annotated.annotations(). If a meta-annotation is present on multiple annotations, it will be returned once for each such declaration.

      This method does not return annotations on super types or interfaces!

      Specified by:
      inheritedAnnotations in interface Annotated
      Returns:
      list of all meta annotations of this element
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object