public class CompilationUnit extends java.lang.Object implements ICompilationUnit
| Modifier and Type | Field and Description |
|---|---|
char[] |
contents |
java.lang.String |
destinationPath |
char[] |
fileName |
char[] |
mainTypeName |
char[] |
module |
JAR_FILE_ENTRY_SEPARATOR| Constructor and Description |
|---|
CompilationUnit(char[] contents,
java.lang.String fileName,
java.lang.String encoding) |
CompilationUnit(char[] contents,
java.lang.String fileName,
java.lang.String encoding,
java.lang.String destinationPath) |
CompilationUnit(char[] contents,
java.lang.String fileName,
java.lang.String encoding,
java.lang.String destinationPath,
boolean ignoreOptionalProblems,
java.lang.String modName) |
| Modifier and Type | Method and Description |
|---|---|
char[] |
getContents()
Answer the contents of the compilation unit.
|
java.lang.String |
getDestinationPath() |
char[] |
getFileName()
Answer the file name which defines the type.
|
char[] |
getMainTypeName()
Answer the name of the top level public type.
|
char[] |
getModuleName()
Returns the name of the module to which this compilation unit is associated.
|
char[][] |
getPackageName()
Answer the name of the package according to the directory structure
or null if package consistency checks should be ignored.
|
boolean |
ignoreOptionalProblems()
Answer if optional problems should be ignored for this compilation unit.
|
ModuleBinding |
module(LookupEnvironment rootEnvironment)
Returns the binding of the module that this compilation unit is associated with.
|
java.lang.String |
toString() |
public char[] contents
public char[] fileName
public char[] mainTypeName
public java.lang.String destinationPath
public char[] module
public CompilationUnit(char[] contents,
java.lang.String fileName,
java.lang.String encoding)
public CompilationUnit(char[] contents,
java.lang.String fileName,
java.lang.String encoding,
java.lang.String destinationPath)
public CompilationUnit(char[] contents,
java.lang.String fileName,
java.lang.String encoding,
java.lang.String destinationPath,
boolean ignoreOptionalProblems,
java.lang.String modName)
public char[] getContents()
ICompilationUnitgetContents in interface ICompilationUnitpublic char[] getFileName()
IDependentgetFileName in interface IDependentIDependent.getFileName()public char[] getMainTypeName()
ICompilationUnitgetMainTypeName in interface ICompilationUnitpublic char[][] getPackageName()
ICompilationUnitgetPackageName in interface ICompilationUnitpublic boolean ignoreOptionalProblems()
ICompilationUnitfalse if there is no preference.ignoreOptionalProblems in interface ICompilationUnitpublic java.lang.String toString()
toString in class java.lang.Objectpublic char[] getModuleName()
ICompilationUnitnull signals the unnamed module.getModuleName in interface ICompilationUnitnull for the unnamed module.public ModuleBinding module(LookupEnvironment rootEnvironment)
ICompilationUnitmodule in interface ICompilationUnitpublic java.lang.String getDestinationPath()
getDestinationPath in interface ICompilationUnit