java.lang.Object
io.helidon.codegen.TypeHierarchy
Utilities for type hierarchy.
- 
Method SummaryModifier and TypeMethodDescriptionstatic List<Annotation> hierarchyAnnotations(CodegenContext ctx, TypeInfo type) Find all annotations on the whole type hierarchy.static List<Annotation> hierarchyAnnotations(CodegenContext ctx, TypeInfo type, TypedElementInfo element) Find all annotations on the whole type hierarchy.static List<Annotation> hierarchyAnnotations(CodegenContext ctx, TypeInfo type, TypedElementInfo executable, TypedElementInfo parameter, int parameterIndex) Annotations of a parameter, taken from the full inheritance hierarchy (super type(s), interface(s).nestedAnnotations(CodegenContext ctx, TypeInfo typeInfo) Annotations on thetypeInfo, it's methods, and method parameters.
- 
Method Details- 
hierarchyAnnotationsFind all annotations on the whole type hierarchy. Adds all annotations on the provided type, and allInheritedannotations on supertype(s) and/or interface(s).- Parameters:
- ctx- codegen context
- type- type info to process
- Returns:
- all annotations on the type and in its hierarchy
 
- 
hierarchyAnnotationspublic static List<Annotation> hierarchyAnnotations(CodegenContext ctx, TypeInfo type, TypedElementInfo element) Find all annotations on the whole type hierarchy. Adds all annotations on the provided element, and allInheritedannotations on the same element from supertype(s), and/or interfaces, and/or annotations.Based on element type: - Constructor: only uses annotations from the current element
- Constructor parameter: ditto
- Method: uses annotations from the current element, and from the overridden method/interface method
- Method parameter: use
     hierarchyAnnotations(CodegenContext, io.helidon.common.types.TypeInfo, io.helidon.common.types.TypedElementInfo, io.helidon.common.types.TypedElementInfo, int)instead
- Field: only uses annotations from the current element
 - Parameters:
- ctx- codegen context
- type- type info owning the executable
- element- executable (method or constructor) element info
- Returns:
- all annotations on the type and in its hierarchy
 
- 
hierarchyAnnotationspublic static List<Annotation> hierarchyAnnotations(CodegenContext ctx, TypeInfo type, TypedElementInfo executable, TypedElementInfo parameter, int parameterIndex) Annotations of a parameter, taken from the full inheritance hierarchy (super type(s), interface(s).- Parameters:
- ctx- codegen context to obtain- TypeInfoof types
- type- type info of the processed type
- executable- owner of the parameter (constructor or method)
- parameter- parameter info itself
- parameterIndex- index of the parameter within the method (as names may be wrong at runtime)
- Returns:
- list of annotations on this parameter on this type, super type(s), and interface methods it implements
 
- 
nestedAnnotationsAnnotations on thetypeInfo, it's methods, and method parameters.- Parameters:
- ctx- context
- typeInfo- type info to check
- Returns:
- a set of all annotation types on any of the elements, including inherited annotations
 
 
-