Module io.helidon.common.types
Package io.helidon.common.types
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>
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.common.types.TypeName
TypeName.Builder, TypeName.BuilderBase<BUILDER extends TypeName.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends TypeName> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTypeNameImpl(TypeName.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionbooleanarray()boxed()Return the boxed equivalent of this type.default StringClass name with enclosing types, separated by..default StringSimple class name with generic declaration (if part of this name).intdefault StringTypically used as part of code-gen, when ".class" is tacked onto the suffix of what this returns.booleanfqName()booleangeneric()The base generic type name, stripped of anyTypeNameBlueprint.typeArguments().inthashCode()default booleanisList()Indicates whether this type is ajava.util.List.default booleanisMap()Indicates whether this type is ajava.util.Map.default booleanIndicates whether this type is ajava.util.Optional.default booleanisSet()Indicates whether this type is ajava.util.Set.name()booleantoString()booleanwildcard()
-
Constructor Details
-
TypeNameImpl
Create an instance providing a builder.- Parameters:
builder- extending builder base of this prototype
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<TypeName>
-
boxed
Description copied from interface:TypeNameReturn the boxed equivalent of this type. If this is not a primitive type, returns this instance. -
toString
-
name
-
genericTypeName
Description copied from interface:TypeNameThe base generic type name, stripped of anyTypeNameBlueprint.typeArguments(). This is equivalent to the type name represented byTypeNameBlueprint.name().- Specified by:
genericTypeNamein interfaceTypeName- Returns:
- based generic type name
-
fqName
-
resolvedName
-
packageName
-
className
-
enclosingNames
-
primitive
public boolean primitive() -
array
public boolean array() -
generic
public boolean generic() -
wildcard
public boolean wildcard() -
typeArguments
-
typeParameters
-
equals
-
hashCode
public int hashCode() -
classNameWithEnclosingNames
Class name with enclosing types, separated by.. If we have an inner classBuilderof classType, this method would returnType.Builder.- Returns:
- class name with enclosing types
-
isList
default boolean isList()Indicates whether this type is ajava.util.List.- Returns:
- if this is a list
-
isSet
default boolean isSet()Indicates whether this type is ajava.util.Set.- Returns:
- if this is a set
-
isMap
default boolean isMap()Indicates whether this type is ajava.util.Map.- Returns:
- if this is a map
-
isOptional
default boolean isOptional()Indicates whether this type is ajava.util.Optional.- Returns:
- if this is an optional
-
classNameWithTypes
Simple class name with generic declaration (if part of this name).- Returns:
- class name with generics, such as
Consumer<java.lang.String>, orConsumer<T>
-
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
-