- All Superinterfaces:
Annotated
,Prototype.Api
- All Known Implementing Classes:
TypeInfo.BuilderBase.TypeInfoImpl
Represents the model object for a type.
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Fluent API builder forTypeInfo
.static class
TypeInfo.BuilderBase<BUILDER extends TypeInfo.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends TypeInfo> Fluent API builder base forTypeInfo
. -
Method Summary
Modifier and TypeMethodDescriptionAccess modifier.static TypeInfo.Builder
builder()
Create a new fluent API builder to customize configuration.static TypeInfo.Builder
Create a new fluent API builder from an existing instance.Description, such as javadoc, if available.The elements that make up the type that are relevant for processing.Type modifiers.default boolean
hasMetaAnnotation
(TypeName annotation, TypeName metaAnnotation) Check if an annotation type has a specific meta annotation.default boolean
hasMetaAnnotation
(TypeName annotation, TypeName metaAnnotation, boolean inherited) Check if an annotation type has a specific meta annotation.The interface classes for this type info.kind()
The kind of this type.default Optional
<Annotation> metaAnnotation
(TypeName annotation, TypeName metaAnnotation) Find a meta annotation.default Optional
<Annotation> metaAnnotation
(TypeName annotation, TypeName metaAnnotation, boolean inherited) Find a meta annotation.Deprecated, for removal: This API element is subject to removal in a future version.module()
Module of this type, if available.moduleNameOf
(TypeName typeName) UsesTypeInfoBlueprint.referencedModuleNames()
to determine if the module name is known for the given type.The element used to create this instance.The elements that make up this type that are considered "other", or being skipped because they are irrelevant to processing.Populated if the (external) module name containing the type is known.Any Map, List, Set, or method that hasTypeNameBlueprint.typeArguments()
will be analyzed and any type arguments will have its annotations added here.The parent/super class for this type info.typeKind()
Deprecated, for removal: This API element is subject to removal in a future version.useTypeInfoBlueprint.kind()
insteadtypeName()
The type name.Methods inherited from interface io.helidon.common.types.Annotated
allAnnotations, annotation, annotations, findAnnotation, hasAnnotation, inheritedAnnotations
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance
- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
typeName
TypeName typeName()The type name.- Returns:
- the type name
-
description
Description, such as javadoc, if available.- Returns:
- description of this element
-
typeKind
Deprecated, for removal: This API element is subject to removal in a future version.useTypeInfoBlueprint.kind()
insteadThe type element kind.Such as
- "INTERFACE"
- "ANNOTATION_TYPE"
- and other constants on
TypeValues
- Returns:
- the type element kind.
- See Also:
-
kind
ElementKind kind()The kind of this type.Such as:
- Returns:
- element kind of this type
-
elementInfo
List<TypedElementInfo> elementInfo()The elements that make up the type that are relevant for processing.- Returns:
- the elements that make up the type that are relevant for processing
-
otherElementInfo
List<TypedElementInfo> otherElementInfo()The elements that make up this type that are considered "other", or being skipped because they are irrelevant to processing.- Returns:
- the elements that still make up the type, but are otherwise deemed irrelevant for processing
-
referencedTypeNamesToAnnotations
Map<TypeName,List<Annotation>> referencedTypeNamesToAnnotations()Any Map, List, Set, or method that hasTypeNameBlueprint.typeArguments()
will be analyzed and any type arguments will have its annotations added here. Note that this only applies to non-built-in types.- Returns:
- all referenced types
-
hasMetaAnnotation
Check if an annotation type has a specific meta annotation.- Parameters:
annotation
- annotation to check meta annotation formetaAnnotation
- meta annotation type- Returns:
- whether the meta annotation is present on the annotation
-
hasMetaAnnotation
Check if an annotation type has a specific meta annotation.- Parameters:
annotation
- annotation to check meta annotation formetaAnnotation
- meta annotation typeinherited
- whether to include meta annotations of meta annotations- Returns:
- whether the meta annotation is present on the annotation
-
metaAnnotation
Find a meta annotation.- Parameters:
annotation
- annotation to check meta annotation formetaAnnotation
- meta annotation type- Returns:
- meta annotation, or empty if not defined
-
metaAnnotation
default Optional<Annotation> metaAnnotation(TypeName annotation, TypeName metaAnnotation, boolean inherited) Find a meta annotation.- Parameters:
annotation
- annotation to check meta annotation formetaAnnotation
- meta annotation typeinherited
- whether to include meta annotations of meta annotations- Returns:
- meta annotation, or empty if not defined
-
referencedModuleNames
Populated if the (external) module name containing the type is known.- Returns:
- type names to its associated defining module name
-
superTypeInfo
The parent/super class for this type info.- Returns:
- the super type
-
interfaceTypeInfo
The interface classes for this type info.- Returns:
- the interface type info
-
modifiers
Deprecated, for removal: This API element is subject to removal in a future version.useTypeInfoBlueprint.elementModifiers()
insteadElement modifiers.- Returns:
- element modifiers
- See Also:
-
elementModifiers
Type modifiers.- Returns:
- set of modifiers that are present on the type (and that we understand)
- See Also:
-
accessModifier
AccessModifier accessModifier()Access modifier.- Returns:
- access modifier
-
module
Module of this type, if available.- Returns:
- module name
-
originatingElement
The element used to create this instance. The type of the object depends on the environment we are in - it may be anTypeElement
in annotation processing, or aClassInfo
when using classpath scanning.- Returns:
- originating element
-
moduleNameOf
UsesTypeInfoBlueprint.referencedModuleNames()
to determine if the module name is known for the given type.- Parameters:
typeName
- the type name to lookup- Returns:
- the module name if it is known
-
TypeInfoBlueprint.elementModifiers()
instead