Package org.codehaus.janino
Class Java.CompilationUnit
java.lang.Object
org.codehaus.janino.Java.CompilationUnit
- All Implemented Interfaces:
Java.Scope
- Enclosing class:
- Java
Holds the result of
Parser.parseCompilationUnit()
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
Represents a single static import declaration likestatic class
Represents a single type import declaration likestatic class
Represents a static-import-on-demand declaration likestatic class
Represents a type-import-on-demand declaration like -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Return the package member class or interface declared with the given name.Get all classes and interfaces declared in this compilation unit.void
setPackageDeclaration
(Java.PackageDeclaration packageDeclaration)
-
Field Details
-
optionalFileName
-
optionalPackageDeclaration
-
importDeclarations
-
packageMemberTypeDeclarations
-
-
Constructor Details
-
CompilationUnit
-
-
Method Details
-
getEnclosingScope
- Specified by:
getEnclosingScope
in interfaceJava.Scope
-
setPackageDeclaration
-
addImportDeclaration
-
addPackageMemberTypeDeclaration
-
getPackageMemberTypeDeclarations
Get all classes and interfaces declared in this compilation unit. -
getPackageMemberTypeDeclaration
Return the package member class or interface declared with the given name.- Parameters:
name
- Declared (i.e. not the fully qualified) name- Returns:
null
if a package member type with that name is not declared in this compilation unit
-