Class BodyContext
java.lang.Object
io.helidon.builder.processor.tools.BodyContext
Represents the context of the body being code generated.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the list of all attributes names.protected booleanReturns true if nulls are allowed.Returns the list of all type elements.protected booleanReturns true if bean "getter" and "is" style is required.Returns the builder annotation that triggered things.protected TypeNameReturns the streamable accept type of the builder and constructor.booleanReturns true if we are currently processing the concrete builder type.protected StringReturns the builder generics alias name for the builder itself.protected StringReturns the builder generics alias name for the type being built.Returns the generic declaration for the builder class type.booleanReturns true if any getter methods from the target clash with any builder method name.booleanhasOtherMethod(String name, TypeInfo typeInfo) Checks whether there is an "other" method that matches the signature.booleanReturns true if the current type has a parent.protected booleanReturns true if there is stream support included on the builder generated class.protected booleanReturns true if there is stream support included on the generated class.Returns the impl type name.protected booleanReturns true ifjakarta.annotations.Generatedannotation should be generated.protected booleanReturns true if meta attributes should be generated.Returns the interceptor create method name.Returns the interceptor implementation type name.booleanReturns true if this builder is extending an abstract class as a target.listType()Returns the list type generated.protected Map<String,TypedElementName> map()Returns the map of all type elements in the entire hierarchy.mapType()Returns the map type generated.Returns the parent annotation type name.Returns the parent type name of the builder.Returns "public" or "" for public or package private declaration, accordingly.protected booleanReturns true if Helidon library dependencies should be expected.setType()Returns the set type generated.protected static StringtoBeanAttributeName(TypedElementName method, boolean isBeanStyleRequired) returns the bean attribute name of a particular method.toString()typeInfo()Returns the type info.
-
Method Details
-
toString
-
doingConcreteType
public boolean doingConcreteType()Returns true if we are currently processing the concrete builder type.- Returns:
- true if we are processing the concrete type
-
implTypeName
Returns the impl type name.- Returns:
- the type name
-
typeInfo
Returns the type info.- Returns:
- the type info
-
builderTriggerAnnotation
Returns the builder annotation that triggered things.- Returns:
- the builder annotation
- See Also:
-
map
Returns the map of all type elements in the entire hierarchy.- Returns:
- the map of elements by name
-
allTypeInfos
Returns the list of all type elements.- Returns:
- the list of type elements
-
allAttributeNames
Returns the list of all attributes names.- Returns:
- the list of attribute names
-
parentTypeName
Returns the parent type name of the builder.- Returns:
- the parent type name
-
parentAnnotationTypeName
Returns the parent annotation type name.- Returns:
- the parent annotation type
-
hasStreamSupportOnImpl
protected boolean hasStreamSupportOnImpl()Returns true if there is stream support included on the generated class.- Returns:
- true if stream support enabled
-
hasStreamSupportOnBuilder
protected boolean hasStreamSupportOnBuilder()Returns true if there is stream support included on the builder generated class.- Returns:
- true if stream support enabled
-
includeMetaAttributes
protected boolean includeMetaAttributes()Returns true if meta attributes should be generated. SeeBuilder.includeMetaAttributes().- Returns:
- true if meta attributes should be generated
-
requireLibraryDependencies
protected boolean requireLibraryDependencies()Returns true if Helidon library dependencies should be expected. SeeBuilder.requireLibraryDependencies().- Returns:
- true if Helidon library dependencies are expected
-
beanStyleRequired
protected boolean beanStyleRequired()Returns true if bean "getter" and "is" style is required. SeeBuilder.requireBeanStyle().- Returns:
- true if bean style is required
-
allowNulls
protected boolean allowNulls()Returns true if nulls are allowed. SeeBuilder.allowNulls().- Returns:
- true if allow nulls
-
includeGeneratedAnnotation
protected boolean includeGeneratedAnnotation()Returns true ifjakarta.annotations.Generatedannotation should be generated. SeeBuilder.includeGeneratedAnnotation().- Returns:
- true if the Generated annotation should be generated on the target beans
-
listType
Returns the list type generated. SeeBuilder.listImplType().- Returns:
- the list type
-
mapType
Returns the map type generated. SeeBuilder.mapImplType().- Returns:
- the map type
-
setType
Returns the set type generated. SeeBuilder.setImplType().- Returns:
- the set type
-
hasParent
public boolean hasParent()Returns true if the current type has a parent.- Returns:
- true if current has parent
-
hasAnyBuilderClashingMethodNames
public boolean hasAnyBuilderClashingMethodNames()Returns true if any getter methods from the target clash with any builder method name.- Returns:
- true if there is a clash
-
isExtendingAnAbstractClass
public boolean isExtendingAnAbstractClass()Returns true if this builder is extending an abstract class as a target.- Returns:
- true if the target is an abstract class
-
ctorBuilderAcceptTypeName
Returns the streamable accept type of the builder and constructor.- Returns:
- the builder accept type
-
genericBuilderClassDecl
Returns the generic declaration for the builder class type.- Returns:
- the generic declaration
-
genericBuilderAliasDecl
Returns the builder generics alias name for the type being built.- Returns:
- the builder generics alias name
-
genericBuilderAcceptAliasDecl
Returns the builder generics alias name for the builder itself.- Returns:
- the builder generics alias name
-
publicOrPackagePrivateDecl
Returns "public" or "" for public or package private declaration, accordingly.- Returns:
- the modifier declaration
-
interceptorTypeName
Returns the interceptor implementation type name. SeeBuilder.interceptor().- Returns:
- the interceptor type name
-
interceptorCreateMethod
Returns the interceptor create method name. SeeBuilder.interceptorCreateMethod().- Returns:
- the interceptor create method name
-
hasOtherMethod
Checks whether there is an "other" method that matches the signature.- Parameters:
name- the method nametypeInfo- the type info to check, which will look through the parent chain- Returns:
- true if there is any matches
-
toBeanAttributeName
returns the bean attribute name of a particular method.- Parameters:
method- the methodisBeanStyleRequired- is bean style required- Returns:
- the bean attribute name
-