org.eclipse.jdt.internal.compiler.batch
类 CompilationUnit
java.lang.Object
org.eclipse.jdt.internal.compiler.batch.CompilationUnit
- 所有已实现的接口:
- ICompilationUnit, IDependent
public class CompilationUnit
- extends Object
- implements ICompilationUnit
|
方法摘要 |
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. |
String |
toString()
|
contents
public char[] contents
fileName
public char[] fileName
mainTypeName
public char[] mainTypeName
destinationPath
public String destinationPath
CompilationUnit
public CompilationUnit(char[] contents,
String fileName,
String encoding)
CompilationUnit
public CompilationUnit(char[] contents,
String fileName,
String encoding,
String destinationPath)
getContents
public char[] getContents()
- 从接口
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.
- 指定者:
- 接口
ICompilationUnit 中的 getContents
getFileName
public char[] getFileName()
- 从接口
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/eclipse/jdt/internal/compileri/env/IDependent.java"
Return null if no file defines the type.
- 指定者:
- 接口
IDependent 中的 getFileName
- 另请参见:
IDependent.getFileName()
getMainTypeName
public char[] getMainTypeName()
- 从接口
ICompilationUnit 复制的描述
- Answer the name of the top level public type.
For example, {Hashtable}.
- 指定者:
- 接口
ICompilationUnit 中的 getMainTypeName
getPackageName
public char[][] getPackageName()
- 从接口
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}.
- 指定者:
- 接口
ICompilationUnit 中的 getPackageName
toString
public String toString()
- 覆盖:
- 类
Object 中的 toString
Copyright © 2013. All Rights Reserved.