01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.internal.compiler.env;
11:
12: /**
13: * This interface denotes a compilation unit, providing its name and content.
14: */
15: public interface ICompilationUnit extends IDependent {
16: /**
17: * Answer the contents of the compilation unit.
18: *
19: * In normal use, the contents are requested twice.
20: * Once during the initial lite parsing step, then again for the
21: * more detailed parsing step.
22: * Implementors must never return null - return an empty char[] instead,
23: * CharOperation.NO_CHAR being the candidate of choice.
24: */
25: char[] getContents();
26:
27: /**
28: * Answer the name of the top level public type.
29: * For example, {Hashtable}.
30: */
31: char[] getMainTypeName();
32:
33: /**
34: * Answer the name of the package according to the directory structure
35: * or null if package consistency checks should be ignored.
36: * For example, {java, lang}.
37: */
38: char[][] getPackageName();
39: }
|