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,Annotated,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 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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.common.types.Annotated
allAnnotations, annotation, findAnnotation, hasAnnotationMethods inherited from interface io.helidon.common.types.TypeName
boxed, classNameWithEnclosingNames, classNameWithTypes, compareTo, declaredName, fqName, genericTypeName, isList, isMap, isOptional, isSet, isSupplier, name, resolvedName, unboxed
-
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
public boolean generic()Description copied from interface:TypeNameIndicates whether this type is using generics. -
wildcard
public boolean wildcard()Description copied from interface:TypeNameIndicates whether this type is using wildcard generics. -
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
public int hashCode()
-