org.aspectj.org.eclipse.jdt.internal.core.builder
Class SourceFile
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.builder.SourceFile
- All Implemented Interfaces:
- ICompilationUnit, IDependent
public class SourceFile
- extends java.lang.Object
- implements ICompilationUnit
|
Constructor Summary |
SourceFile(IFile resource,
org.aspectj.org.eclipse.jdt.internal.core.builder.ClasspathMultiDirectory sourceLocation)
|
SourceFile(IFile resource,
org.aspectj.org.eclipse.jdt.internal.core.builder.ClasspathMultiDirectory sourceLocation,
boolean updateClassFile)
|
|
Method Summary |
boolean |
equals(java.lang.Object o)
|
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. |
int |
hashCode()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
resource
public IFile resource
SourceFile
public SourceFile(IFile resource,
org.aspectj.org.eclipse.jdt.internal.core.builder.ClasspathMultiDirectory sourceLocation)
SourceFile
public SourceFile(IFile resource,
org.aspectj.org.eclipse.jdt.internal.core.builder.ClasspathMultiDirectory sourceLocation,
boolean updateClassFile)
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
getContents
public char[] getContents()
- Description copied from interface:
ICompilationUnit
- 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.
- Specified by:
getContents in interface ICompilationUnit
getFileName
public char[] getFileName()
- Description copied from interface:
IDependent
- Answer the file name which defines the type.
The path part (optional) must be separated from the actual
file proper name by a separator suitable for the type (java.io.File.separator for example),
e.g.
"c:\\source\\com\\p\\X.java" or
"/com/p/Y.java".
The path to the zip or jar file (optional) must be separated
from the actual path part by JAR_FILE_ENTRY_SEPARATOR,
e.g.
"c:\\lib\\some.jar|/com/p/X.class" or
"/lib/some.zip|/com/q/Y.class".
The proper file name includes the suffix extension (e.g. ".java")
e.g. "c:/org.aspectj.org.eclipse.jdt/internal/compileri/env/IDependent.java"
Return null if no file defines the type.
- Specified by:
getFileName in interface IDependent
- See Also:
IDependent.getFileName()
getMainTypeName
public char[] getMainTypeName()
- Description copied from interface:
ICompilationUnit
- Answer the name of the top level public type.
For example, {Hashtable}.
- Specified by:
getMainTypeName in interface ICompilationUnit
getPackageName
public char[][] getPackageName()
- Description copied from interface:
ICompilationUnit
- Answer the name of the package according to the directory structure
or null if package consistency checks should be ignored.
For example, {java, lang}.
- Specified by:
getPackageName in interface ICompilationUnit
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object