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[] contents
           
 String destinationPath
           
 char[] fileName
           
 char[] mainTypeName
           
 
从接口 org.eclipse.jdt.internal.compiler.env.IDependent 继承的字段
JAR_FILE_ENTRY_SEPARATOR
 
构造方法摘要
CompilationUnit(char[] contents, String fileName, String encoding)
           
CompilationUnit(char[] contents, String fileName, String encoding, String destinationPath)
           
 
方法摘要
 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()
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

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.