Interface ICompilationUnit
- All Superinterfaces:
IDependent
- All Known Implementing Classes:
AssistCompilationUnit
,BasicCompilationUnit
,ClassFileWorkingCopy
,CompilationUnit
,CompilationUnit
,CompilationUnit
,PossibleMatch
,ResourceCompilationUnit
,SourceFile
This interface denotes a compilation unit, providing its name and content.
Note: This internal interface has been implemented illegally by the org.apache.jasper.glassfish bundle from Orbit, see bug 500211. Avoid changing the API or supply default methods to avoid breaking the Eclipse Help system.
-
Field Summary
Fields inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.env.IDependent
JAR_FILE_ENTRY_SEPARATOR
-
Method Summary
Modifier and TypeMethodDescriptionchar[]
Answer the contents of the compilation unit.default String
default String
getExternalAnnotationPath
(String qualifiedTypeName) Answers a path for external annotations that has been configured for the providing classpath entry, ornull
.char[]
Answer the name of the top level public type.default char[]
Returns the name of the module to which this compilation unit is associated.char[][]
Answer the name of the package according to the directory structure or null if package consistency checks should be ignored.default boolean
Answer if optional problems should be ignored for this compilation unit.default ModuleBinding
module
(LookupEnvironment environment) Returns the binding of the module that this compilation unit is associated with.Methods inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.env.IDependent
getFileName
-
Method Details
-
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}. -
ignoreOptionalProblems
default boolean ignoreOptionalProblems()Answer if optional problems should be ignored for this compilation unit. Implementors should returnfalse
if there is no preference. -
module
Returns the binding of the module that this compilation unit is associated with.- Returns:
- the binding representing the module.
-
getModuleName
default char[] getModuleName()Returns the name of the module to which this compilation unit is associated. A return value ofnull
signals the unnamed module.- Returns:
- module name or
null
for the unnamed module.
-
getDestinationPath
-
getExternalAnnotationPath
Answers a path for external annotations that has been configured for the providing classpath entry, ornull
.
-