public class BasicCompilationUnit extends java.lang.Object implements ICompilationUnit
ICompilationUnit
for use in the SourceMapper.ICompilationUnit| Modifier and Type | Field and Description |
|---|---|
protected char[] |
contents |
protected java.lang.String |
encoding |
protected char[] |
fileName |
protected char[] |
mainTypeName |
protected char[][] |
packageName |
JAR_FILE_ENTRY_SEPARATOR| Constructor and Description |
|---|
BasicCompilationUnit(char[] contents,
char[][] packageName,
java.lang.String fileName) |
BasicCompilationUnit(char[] contents,
char[][] packageName,
java.lang.String fileName,
IJavaElement javaElement) |
BasicCompilationUnit(char[] contents,
char[][] packageName,
java.lang.String fileName,
java.lang.String encoding) |
| Modifier and Type | Method and Description |
|---|---|
char[] |
getContents()
Answer the contents of the compilation unit.
|
char[] |
getFileName()
Answer the file name which defines the type.
|
char[] |
getMainTypeName()
Answer the name of the top level public type.
|
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.
|
java.lang.String |
toString() |
protected char[] contents
protected char[] fileName
protected char[][] packageName
protected char[] mainTypeName
protected java.lang.String encoding
public BasicCompilationUnit(char[] contents,
char[][] packageName,
java.lang.String fileName)
public BasicCompilationUnit(char[] contents,
char[][] packageName,
java.lang.String fileName,
java.lang.String encoding)
public BasicCompilationUnit(char[] contents,
char[][] packageName,
java.lang.String fileName,
IJavaElement javaElement)
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.Object