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>
-
Nested Class Summary
Nested classes/interfaces inherited from interface TypeName
TypeName.Builder, TypeName.BuilderBase<BUILDER, PROTOTYPE>Modifier and TypeInterfaceDescriptionstatic classFluent API builder forTypeName.static classTypeName.BuilderBase<BUILDER extends TypeName.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends TypeName>Fluent API builder base forTypeName. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTypeNameImpl(TypeName.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionList of declared and known annotations for this element.booleanarray()Functions similar toClass.isArray().Functions similar toClass.getSimpleName().Component type of array.Simple names of enclosing classes (if any exist).booleanbooleangeneric()Indicates whether this type is using generics.inthashCode()List of all inherited annotations for this element.Generic types that provide keywordextendswill have a lower bound defined.Functions similar toClass.getPackageName().booleanFunctions similar toClass.isPrimitive().toString()Returns the list of generic type arguments, or an empty list if no generics are in use.Type parameters associated with the type arguments.Generic types that provide keywordsuperwill have an upper bound defined.booleanvararg()If this is a representation ofTypeName.array(), this method can identify that it was declared as a vararg.booleanwildcard()Indicates whether this type is using wildcard generics.Methods inherited from interface Annotated
allAnnotations, annotation, findAnnotation, hasAnnotationModifier and TypeMethodDescriptiondefault List<Annotation> List of all annotations - bothAnnotated.annotations()andAnnotated.inheritedAnnotations().default Annotationannotation(TypeName annotationType) Get an annotation on this annotated type.default Optional<Annotation> findAnnotation(TypeName annotationType) Find an annotation on this annotated type.default booleanhasAnnotation(TypeName annotationType) Check if the annotation exists on this annotated.Methods inherited from interface TypeName
boxed, classNameWithEnclosingNames, classNameWithTypes, compareTo, declaredName, fqName, genericTypeName, isList, isMap, isOptional, isSet, isSupplier, name, resolvedName, unboxedModifier and TypeMethodDescriptiondefault TypeNameboxed()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).default intCompare with another type name.default StringTypically used as part of code-gen, when ".class" is tacked onto the suffix of what this returns.default StringfqName()The fully qualified type name.default TypeNameThe base generic type name, stripped of anyTypeName.typeArguments().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.default booleanIndicates whether this type is aSupplier.default Stringname()The base name that includes the package name concatenated with the class name.default StringThe fully resolved type.default TypeNameunboxed()Return the unboxed equivalent of this type.
-
Constructor Details
-
TypeNameImpl
Create an instance providing a builder.- Parameters:
builder- extending builder base of this prototype
-
-
Method Details
-
toString
-
packageName
Description copied from interface:TypeNameFunctions similar toClass.getPackageName().- Specified by:
packageNamein interfaceTypeName- Returns:
- the package name, never null
-
className
Description copied from interface:TypeNameFunctions similar toClass.getSimpleName(). -
enclosingNames
Description copied from interface:TypeNameSimple names of enclosing classes (if any exist). For example for typeio.helidon.example.Type$NestOne$NestTwo, this would return a list ofType, NestOne.- Specified by:
enclosingNamesin interfaceTypeName- Returns:
- enclosing classes simple names
-
primitive
public boolean primitive()Description copied from interface:TypeNameFunctions similar toClass.isPrimitive(). -
array
public boolean array()Description copied from interface:TypeNameFunctions similar toClass.isArray(). -
vararg
public boolean vararg()Description copied from interface:TypeNameIf this is a representation ofTypeName.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). -
generic
-
wildcard
-
typeArguments
Description copied from interface:TypeNameReturns the list of generic type arguments, or an empty list if no generics are in use.- Specified by:
typeArgumentsin interfaceTypeName- Returns:
- the type arguments of this type, if this type supports generics/parameterized type
- See Also:
-
typeParameters
Description copied from interface:TypeNameType 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). ifTypeName.typeArguments()exist, this list MUST exist and have the same size and order (it maps the name to the type).- Specified by:
typeParametersin interfaceTypeName- Returns:
- type parameter names as declared on this type, or names that represent the
TypeName.typeArguments()
-
lowerBounds
Description copied from interface:TypeNameGeneric types that provide keywordextendswill 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:
lowerBoundsin interfaceTypeName- Returns:
- list of lower bounds of this type
- See Also:
-
upperBounds
Description copied from interface:TypeNameGeneric types that provide keywordsuperwill 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:
upperBoundsin interfaceTypeName- Returns:
- list of upper bounds of this type
- See Also:
-
componentType
Description copied from interface:TypeNameComponent type of array.- Specified by:
componentTypein interfaceTypeName- Returns:
- component type of array
-
annotations
Description copied from interface:AnnotatedList 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 theof the annotation).- Specified by:
annotationsin interfaceAnnotated- Returns:
- the list of annotations declared on this element
-
inheritedAnnotations
Description copied from interface:AnnotatedList of all inherited annotations for this element. Inherited annotations are annotations declared on annotations of this element that are also marked asInherited.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:
inheritedAnnotationsin interfaceAnnotated- Returns:
- list of all meta annotations of this element
-
equals
-
hashCode
-