## org.eclipse.emf.codegen.merge.java.facade
Interface JCompilationUnit

All Superinterfaces:
  JNode

All Known Implementing Classes:
  ASTJCompilationUnit, JDOMJCompilationUnit

    public interface JCompilationUnit

extends JNode

Represents an entire Java compilation unit (`.java` source file). Compilation unit elements need to be opened before they can be navigated. The children are of type `JPackage`, `JImport`, and `JType`, and appear in the order in which they are declared in the source. If a `.java` file cannot be parsed, its structure remains unknown.

Since:
  2.2.0

Method Summary
`java.lang.String` `getHeader()` Returns the header comment for this compilation unit.
`void` `setHeader(java.lang.String header)` Sets the header comment for this compilation unit.

Methods inherited from interface org.eclipse.emf.codegen.merge.java.facade.JNode
`getChildren, getContents, getFlags, getName, getParent, getQualifiedName, setFlags, setName`

Method Detail

### getHeader

    java.lang.String getHeader()

  Returns the header comment for this compilation unit. The header comment appears before the first declaration in a compilation unit.

  Returns:
    the header comment for this compilation unit, or `null` if no header comment is present

### setHeader

    void setHeader(java.lang.String header)

  Sets the header comment for this compilation unit. The header comment appears before the first declaration in a compilation unit. The syntax for a comment corresponds to Comments (JLS2 3.7), including comment delimiters.

  Parameters:
    `header` - the header comment for this compilation unit, or `null` if indicating no header comment

Copyright 2001-2006 IBM Corporation and others. All Rights Reserved.