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
ConstructorsModifierConstructorDescriptionprotected
TypeNameImpl
(TypeName.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionboolean
array()
boxed()
Return the boxed equivalent of this type.default String
Class name with enclosing types, separated by.
.default String
Simple class name with generic declaration (if part of this name).int
default String
Typically used as part of code-gen, when ".class" is tacked onto the suffix of what this returns.boolean
fqName()
boolean
generic()
The base generic type name, stripped of anyTypeNameBlueprint.typeArguments()
.int
hashCode()
default boolean
isList()
Indicates whether this type is ajava.util.List
.default boolean
isMap()
Indicates whether this type is ajava.util.Map
.default boolean
Indicates whether this type is ajava.util.Optional
.default boolean
isSet()
Indicates whether this type is ajava.util.Set
.default boolean
Indicates whether this type is aSupplier
.name()
boolean
toString()
boolean
wildcard()
-
Constructor Details
-
TypeNameImpl
Create an instance providing a builder.- Parameters:
builder
- extending builder base of this prototype
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<TypeName>
-
boxed
Description copied from interface:TypeName
Return the boxed equivalent of this type. If this is not a primitive type, returns this instance. -
toString
-
name
-
genericTypeName
Description copied from interface:TypeName
The base generic type name, stripped of anyTypeNameBlueprint.typeArguments()
. This is equivalent to the type name represented byTypeNameBlueprint.name()
.- Specified by:
genericTypeName
in 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 classBuilder
of 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
-
isSupplier
default boolean isSupplier()Indicates whether this type is aSupplier
.- Returns:
- if this is a supplier
-
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
-