Class ScanTypeInfoFactory
java.lang.Object
io.helidon.codegen.TypeInfoFactoryBase
io.helidon.codegen.scan.ScanTypeInfoFactory
Factory to analyze processed types and to provide
TypeInfo for them.-
Method Summary
Modifier and TypeMethodDescriptioncreate(ScanContext ctx, io.github.classgraph.ClassInfo classInfo) Create type information from a type element, reading all child elements.create(ScanContext ctx, io.github.classgraph.ClassInfo classInfo, Predicate<TypedElementInfo> elementPredicate) Create type information from a type element.create(ScanContext ctx, TypeName typeName) Create type information for a type name, reading all child elements.create(ScanContext ctx, TypeName typeName, Predicate<TypedElementInfo> elementPredicate) Create type information for a type name.Methods inherited from class TypeInfoFactoryBase
annotationFilter, isBuiltInJavaType, mapAnnotation, mapElement, mapType, modifiersModifier and TypeMethodDescriptionprotected static booleanannotationFilter(Annotation annotation) A filter for annotations to exclude ones we are not interested in (SuppressWarnings,Override,Target,Retention,Repeatable.protected static booleanisBuiltInJavaType(TypeName type) Check if the provided type is either a primitive type, or is from thejavapackage namespace.protected static List<Annotation> mapAnnotation(CodegenContext ctx, Annotation annotation, ElementKind kind) Map an annotation using context type mappers.protected static Optional<TypedElementInfo> mapElement(CodegenContext ctx, TypedElementInfo element) Map an element using context type mappers.mapType(CodegenContext ctx, TypeInfo type) Map a type using context type mappers.modifiers(CodegenContext ctx, Set<String> stringModifiers) Map a string representation of a modifier to its Helidon counterpart.
-
Method Details
-
create
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(ScanContext ctx, TypeName typeName, Predicate<TypedElementInfo> elementPredicate) throws IllegalArgumentException 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
Create type information from a type element, reading all child elements.- Parameters:
ctx- annotation processor processing contextclassInfo- 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(ScanContext ctx, io.github.classgraph.ClassInfo classInfo, Predicate<TypedElementInfo> elementPredicate) throws IllegalArgumentException Create type information from a type element.- Parameters:
ctx- annotation processor processing contextclassInfo- 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
-