java.lang.Object
io.helidon.codegen.TypeInfoFactoryBase
io.helidon.codegen.apt.AptTypeInfoFactory
Deprecated, for removal: This API element is subject to removal in a future version.
Factory to analyze processed types and to provide
TypeInfo
for them.-
Method Summary
Modifier and TypeMethodDescriptioncreate
(AptContext ctx, TypeName typeName) Deprecated, for removal: This API element is subject to removal in a future version.Create type information for a type name, reading all child elements.create
(AptContext ctx, TypeName typeName, Predicate<TypedElementInfo> elementPredicate) Deprecated, for removal: This API element is subject to removal in a future version.Create type information for a type name.create
(AptContext ctx, TypeElement typeElement) Deprecated, for removal: This API element is subject to removal in a future version.this is an internal API, all usage should be done throughhelidon-codegen
APIs, such asCodegenContext.typeInfo(io.helidon.common.types.TypeName)
create
(AptContext ctx, TypeElement typeElement, Predicate<TypedElementInfo> elementPredicate) Deprecated, for removal: This API element is subject to removal in a future version.Create type information from a type element.static Optional
<TypedElementInfo> createTypedElementInfoFromElement
(AptContext ctx, TypeName processedType, Element v, Elements elements) Deprecated, for removal: This API element is subject to removal in a future version.Creates an instance of aTypedElementInfo
given its type and variable element from annotation processing.static Optional
<TypedElementInfo> createTypedElementInfoFromElement
(AptContext ctx, Element v, Elements elements) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class io.helidon.codegen.TypeInfoFactoryBase
annotationFilter, isBuiltInJavaType, mapAnnotation, mapElement, mapType, modifiers
-
Method Details
-
create
Deprecated, for removal: This API element is subject to removal in a future version.Create type information for a type name, reading all child elements.- Parameters:
ctx
- annotation processor processing contexttypeName
- type name to find- Returns:
- type info for the type element
- Throws:
IllegalArgumentException
- when the element cannot be resolved into type info (such as if you ask for a primitive type)
-
create
public static Optional<TypeInfo> create(AptContext ctx, TypeName typeName, Predicate<TypedElementInfo> elementPredicate) throws IllegalArgumentException Deprecated, for removal: This API element is subject to removal in a future version.Create type information for a type name.- Parameters:
ctx
- annotation processor processing environmenttypeName
- type name to findelementPredicate
- predicate for child elements- Returns:
- type info for the type element, or empty if it cannot be resolved
- Throws:
IllegalArgumentException
-
create
@Deprecated(forRemoval=true) public static Optional<TypeInfo> create(AptContext ctx, TypeElement typeElement) Deprecated, for removal: This API element is subject to removal in a future version.this is an internal API, all usage should be done throughhelidon-codegen
APIs, such asCodegenContext.typeInfo(io.helidon.common.types.TypeName)
Create type information from a type element, reading all child elements.- Parameters:
ctx
- annotation processor processing contexttypeElement
- type element of the type we want to analyze- Returns:
- type info for the type element
- Throws:
IllegalArgumentException
- when the element cannot be resolved into type info (such as if you ask for a primitive type)
-
create
public static Optional<TypeInfo> create(AptContext ctx, TypeElement typeElement, Predicate<TypedElementInfo> elementPredicate) throws IllegalArgumentException Deprecated, for removal: This API element is subject to removal in a future version.Create type information from a type element.- Parameters:
ctx
- annotation processor processing contexttypeElement
- type element of the type we want to analyzeelementPredicate
- predicate for child elements- Returns:
- type info for the type element, or empty if it cannot be resolved
- Throws:
IllegalArgumentException
-
createTypedElementInfoFromElement
public static Optional<TypedElementInfo> createTypedElementInfoFromElement(AptContext ctx, TypeName processedType, Element v, Elements elements) Deprecated, for removal: This API element is subject to removal in a future version.Creates an instance of aTypedElementInfo
given its type and variable element from annotation processing. If the passed in element is not aElementKind.FIELD
,ElementKind.METHOD
,ElementKind.CONSTRUCTOR
, orElementKind.PARAMETER
then this method may return empty.- Parameters:
ctx
- annotation processing contextprocessedType
- the type that is being processed, to avoid infinite loop when looking for inherited annotationsv
- the element (from annotation processing)elements
- the elements- Returns:
- the created instance
-
createTypedElementInfoFromElement
@Deprecated(since="4.0.10", forRemoval=true) public static Optional<TypedElementInfo> createTypedElementInfoFromElement(AptContext ctx, Element v, Elements elements) Deprecated, for removal: This API element is subject to removal in a future version.Creates an instance of aTypedElementInfo
given its type and variable element from annotation processing. If the passed in element is not aElementKind.FIELD
,ElementKind.METHOD
,ElementKind.CONSTRUCTOR
, orElementKind.PARAMETER
then this method may return empty.This method does not include inherited annotations.
- Parameters:
ctx
- annotation processing contextv
- the element (from annotation processing)elements
- the elements- Returns:
- the created instance
-
helidon-codegen
APIs, such asCodegenContext.typeInfo(io.helidon.common.types.TypeName)
; this type will be package local in the future