# Uses of Class
org.codehaus.janino.Java.CompilationUnit

Packages that use Java.CompilationUnit
Package
Description
org.codehaus.janino
The core of the Janino Java compiler.
org.codehaus.janino.util
Application-independent helper classes.

## Uses of Java.CompilationUnit in org.codehaus.janino

Methods in org.codehaus.janino that return Java.CompilationUnit
Modifier and Type
Method
Description
`Java.CompilationUnit`
Java.PackageMemberClassDeclaration.`getDeclaringCompilationUnit()`
`Java.CompilationUnit`
Java.PackageMemberInterfaceDeclaration.`getDeclaringCompilationUnit()`
`Java.CompilationUnit`
Java.PackageMemberTypeDeclaration.`getDeclaringCompilationUnit()`
Methods in org.codehaus.janino with parameters of type Java.CompilationUnit
Modifier and Type
Method
Description
`protected Java.PackageMemberClassDeclaration`
ClassBodyEvaluator.`addPackageMemberClassDeclaration(Location location, Java.CompilationUnit compilationUnit)`
To the given `Java.CompilationUnit`, add A class declaration with the configured name, superclass and interfaces A method declaration with the given return type, name, parameter names and values and thrown exceptions
`protected void`
ScriptEvaluator.`cook(Java.CompilationUnit compilationUnit)`
Compiles the given compilationUnit, defines it into a `ClassLoader`, loads the generated class, gets the script methods from that class, and makes them available through `ScriptEvaluator.getMethod(int)`.
`final void`
ScriptEvaluator.`cook(Java.CompilationUnit compilationUnit, Collection<Java.MethodDeclarator> methodDeclarators)`
`void`
Java.PackageMemberClassDeclaration.`setDeclaringCompilationUnit(Java.CompilationUnit declaringCompilationUnit)`
`void`
Java.PackageMemberInterfaceDeclaration.`setDeclaringCompilationUnit(Java.CompilationUnit declaringCompilationUnit)`
`void`
Java.PackageMemberTypeDeclaration.`setDeclaringCompilationUnit(Java.CompilationUnit declaringCompilationUnit)`
Sets the `Java.AbstractCompilationUnit` in which this top-level type is declared.
`R`
Visitor.AbstractCompilationUnitVisitor.`visitCompilationUnit(Java.CompilationUnit cu)`
Invoked by `accept(Visitor.AbstractCompilationUnitVisitor)`

## Uses of Java.CompilationUnit in org.codehaus.janino.util

Methods in org.codehaus.janino.util that return Java.CompilationUnit
Modifier and Type
Method
Description
`Java.CompilationUnit`
DeepCopier.`copyCompilationUnit(Java.CompilationUnit subject)`
Methods in org.codehaus.janino.util with parameters of type Java.CompilationUnit
Modifier and Type
Method
Description
`Java.CompilationUnit`
DeepCopier.`copyCompilationUnit(Java.CompilationUnit subject)`
`void`
AbstractTraverser.`traverseCompilationUnit(Java.CompilationUnit cu)`
`void`
Traverser.`traverseCompilationUnit(Java.CompilationUnit cu)`