org.eclipse.jdt.internal.compiler.env
Interface ICompilationUnit

All Superinterfaces:
IDependent
All Known Implementing Classes:
AssistCompilationUnit, BasicCompilationUnit, ClassFileWorkingCopy, CompilationUnit, CompilationUnit, CompilationUnit, PossibleMatch, ResourceCompilationUnit, SourceFile

public interface ICompilationUnit
extends IDependent

This interface denotes a compilation unit, providing its name and content.


Field Summary
 
Fields inherited from interface org.eclipse.jdt.internal.compiler.env.IDependent
JAR_FILE_ENTRY_SEPARATOR
 
Method Summary
 char[] getContents()
          Answer the contents of the compilation unit.
 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.
 
Methods inherited from interface org.eclipse.jdt.internal.compiler.env.IDependent
getFileName
 

Method Detail

getContents

char[] getContents()
Answer the contents of the compilation unit. In normal use, the contents are requested twice. Once during the initial lite parsing step, then again for the more detailed parsing step. Implementors must never return null - return an empty char[] instead, CharOperation.NO_CHAR being the candidate of choice.


getMainTypeName

char[] getMainTypeName()
Answer the name of the top level public type. For example, {Hashtable}.


getPackageName

char[][] getPackageName()
Answer the name of the package according to the directory structure or null if package consistency checks should be ignored. For example, {java, lang}.