Klasse CompilationUnit

java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.batch.CompilationUnit
Alle implementierten Schnittstellen:
ICompilationUnit, IDependent

public class CompilationUnit extends Object implements ICompilationUnit
  • Felddetails

    • contents

      public char[] contents
    • fileName

      public char[] fileName
    • mainTypeName

      public char[] mainTypeName
    • destinationPath

      public String destinationPath
    • module

      public char[] module
  • Konstruktordetails

    • CompilationUnit

      public CompilationUnit(char[] contents, String fileName, String encoding)
    • CompilationUnit

      public CompilationUnit(char[] contents, String fileName, String encoding, String destinationPath)
    • CompilationUnit

      public CompilationUnit(char[] contents, String fileName, String encoding, String destinationPath, boolean ignoreOptionalProblems, String modName)
    • CompilationUnit

      public CompilationUnit(char[] contents, String fileName, String encoding, String destinationPath, boolean ignoreOptionalProblems, String modName, Function<String,String> annotationPathProvider)
  • Methodendetails

    • getContents

      public char[] getContents()
      Beschreibung aus Schnittstelle kopiert: 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.
      Angegeben von:
      getContents in Schnittstelle ICompilationUnit
    • getFileName

      public char[] getFileName()
      Beschreibung aus Schnittstelle kopiert: 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.
      Angegeben von:
      getFileName in Schnittstelle IDependent
      Siehe auch:
      • ungültiges @see
        org.eclipse.jdt.internal.compiler.env.IDependent#getFileName()
    • getMainTypeName

      public char[] getMainTypeName()
      Beschreibung aus Schnittstelle kopiert: ICompilationUnit
      Answer the name of the top level public type. For example, {Hashtable}.
      Angegeben von:
      getMainTypeName in Schnittstelle ICompilationUnit
    • getPackageName

      public char[][] getPackageName()
      Beschreibung aus Schnittstelle kopiert: 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}.
      Angegeben von:
      getPackageName in Schnittstelle ICompilationUnit
    • ignoreOptionalProblems

      public boolean ignoreOptionalProblems()
      Beschreibung aus Schnittstelle kopiert: ICompilationUnit
      Answer if optional problems should be ignored for this compilation unit. Implementors should return false if there is no preference.
      Angegeben von:
      ignoreOptionalProblems in Schnittstelle ICompilationUnit
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
    • getModuleName

      public char[] getModuleName()
      Beschreibung aus Schnittstelle kopiert: ICompilationUnit
      Returns the name of the module to which this compilation unit is associated. A return value of null signals the unnamed module.
      Angegeben von:
      getModuleName in Schnittstelle ICompilationUnit
      Gibt zurück:
      module name or null for the unnamed module.
    • module

      public ModuleBinding module(LookupEnvironment rootEnvironment)
      Beschreibung aus Schnittstelle kopiert: ICompilationUnit
      Returns the binding of the module that this compilation unit is associated with.
      Angegeben von:
      module in Schnittstelle ICompilationUnit
      Gibt zurück:
      the binding representing the module.
    • getDestinationPath

      public String getDestinationPath()
      Angegeben von:
      getDestinationPath in Schnittstelle ICompilationUnit
    • getExternalAnnotationPath

      public String getExternalAnnotationPath(String qualifiedTypeName)
      Beschreibung aus Schnittstelle kopiert: ICompilationUnit
      Answers a path for external annotations that has been configured for the providing classpath entry, or null.
      Angegeben von:
      getExternalAnnotationPath in Schnittstelle ICompilationUnit