public class JavaStubGenerator
extends Object
Generates Java stub source for Groovy classes during joint compilation.
| Constructor and description |
|---|
JavaStubGenerator(File outputPath)Creates a stub generator that writes to the supplied output directory using the default charset. |
JavaStubGenerator(File outputPath, boolean requireSuperResolved, String encoding)Creates a stub generator with explicit output options. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
clean()Deletes generated stub files and clears the tracked stub set. |
|
public void |
generateClass(ClassNode classNode)Generates a Java stub for the supplied class when it is eligible for stub generation. |
|
public Set<JavaFileObject> |
getJavaStubCompilationUnitSet()Returns the generated in-memory or file-backed Java file objects. |
Creates a stub generator that writes to the supplied output directory using the default charset.
outputPath - the destination directory, or null for
in-memory stubsCreates a stub generator with explicit output options.
outputPath - the destination directory, or null for
in-memory stubsrequireSuperResolved - whether generation should wait until the
superclass is resolvedencoding - the source encoding to use for generated filesDeletes generated stub files and clears the tracked stub set.
Generates a Java stub for the supplied class when it is eligible for stub generation.
classNode - the class to generate a stub forReturns the generated in-memory or file-backed Java file objects.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.