Class GroovyPoetSourceGenerator
java.lang.Object
io.micronaut.sourcegen.JavaPoetSourceGenerator
io.micronaut.sourcegen.GroovyPoetSourceGenerator
- All Implemented Interfaces:
SourceGenerator
Reuse the Java source generator for Groovy.
Every generated class, record, enum and interface is annotated with
groovy.transform.CompileStatic so that the Groovy compiler compiles it statically.- Since:
- 1.0
- Author:
- Denis Stepanov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcustomizeTypeBuilder(ObjectDef objectDef, TypeSpec.Builder typeBuilder) Hook for subclasses to customize the type builder of a class, record, enum or interface before it is built.io.micronaut.inject.visitor.VisitorContext.LanguageMethods inherited from class JavaPoetSourceGenerator
writeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SourceGenerator
write
-
Constructor Details
-
GroovyPoetSourceGenerator
public GroovyPoetSourceGenerator()
-
-
Method Details
-
getLanguage
public io.micronaut.inject.visitor.VisitorContext.Language getLanguage()- Specified by:
getLanguagein interfaceSourceGenerator- Overrides:
getLanguagein classJavaPoetSourceGenerator- Returns:
- The source language of the generator
-
customizeTypeBuilder
Description copied from class:JavaPoetSourceGeneratorHook for subclasses to customize the type builder of a class, record, enum or interface before it is built. Annotation definitions are not passed through this hook.- Overrides:
customizeTypeBuilderin classJavaPoetSourceGenerator- Parameters:
objectDef- The object definitiontypeBuilder- The type builder
-