/*******************************************************************************
- * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
+ * are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
+ * http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
- ******************************************************************************/
+ *******************************************************************************/
package net.sourceforge.phpdt.internal.compiler;
import net.sourceforge.phpdt.core.compiler.IProblem;
* other simpler elements (package, import) are read all at once:
* - accept<Element>
*/
-
+
public interface ISourceElementRequestor {
-void acceptConstructorReference(char[] typeName, int argCount, int sourcePosition);
-void acceptFieldReference(char[] fieldName, int sourcePosition);
-/**
- * @param declarationStart This is the position of the first character of the
- * import keyword.
- * @param declarationEnd This is the position of the ';' ending the import statement
- * or the end of the comment following the import.
- * @param name This is the name of the import like specified in the source including the dots. The '.*'
- * is never included in the name.
- * @param onDemand set to true if the import is an import on demand (e.g. import java.io.*). False otherwise.
- */
-void acceptImport(
- int declarationStart,
- int declarationEnd,
- char[] name,
- boolean onDemand);
-/*
- * Table of line separator position. This table is passed once at the end
- * of the parse action, so as to allow computation of normalized ranges.
- *
- * A line separator might corresponds to several characters in the source,
- *
- */
-void acceptLineSeparatorPositions(int[] positions);
-void acceptMethodReference(char[] methodName, int argCount, int sourcePosition);
-void acceptPackage(
- int declarationStart,
- int declarationEnd,
- char[] name);
-void acceptProblem(IProblem problem);
-void acceptTypeReference(char[][] typeName, int sourceStart, int sourceEnd);
-void acceptTypeReference(char[] typeName, int sourcePosition);
-void acceptUnknownReference(char[][] name, int sourceStart, int sourceEnd);
-void acceptUnknownReference(char[] name, int sourcePosition);
-void enterClass(
- int declarationStart,
- int modifiers,
- char[] name,
- int nameSourceStart,
- int nameSourceEnd,
- char[] superclass,
- char[][] superinterfaces);
-void enterCompilationUnit();
-void enterConstructor(
- int declarationStart,
- int modifiers,
- char[] name,
- int nameSourceStart,
- int nameSourceEnd,
- char[][] parameterTypes,
- char[][] parameterNames,
- char[][] exceptionTypes);
-void enterField(
- int declarationStart,
- int modifiers,
- char[] type,
- char[] name,
- int nameSourceStart,
- int nameSourceEnd);
-void enterInitializer(
- int declarationStart,
- int modifiers);
-void enterInterface(
- int declarationStart,
- int modifiers,
- char[] name,
- int nameSourceStart,
- int nameSourceEnd,
- char[][] superinterfaces);
-void enterMethod(
- int declarationStart,
- int modifiers,
- char[] returnType,
- char[] name,
- int nameSourceStart,
- int nameSourceEnd,
- char[][] parameterTypes,
- char[][] parameterNames,
- char[][] exceptionTypes);
-void exitClass(int declarationEnd);
-void exitCompilationUnit(int declarationEnd);
-void exitConstructor(int declarationEnd);
-/*
- * - No initialization source for now -
- * initializationSource denotes the source of the expression used for initializing
- * the field if any (if no source, then it is null).
- *
- * Note: the initializationSource will be used in case we do need to type check
- * against source models, and thus the only interesting use for it is field
- * constant propagation. Therefore, the initializationSource will only be non
- * null for final fields (so as to minimize char[] allocations).
- */
-void exitField(/*char[] initializationSource, */int declarationEnd);
-void exitInitializer(int declarationEnd);
-void exitInterface(int declarationEnd);
-void exitMethod(int declarationEnd);
+ void acceptConstructorReference(char[] typeName, int argCount, int sourcePosition);
+ //void acceptFieldReference(char[] fieldName, int sourcePosition);
+ /**
+ * @param declarationStart This is the position of the first character of the
+ * import keyword.
+ * @param declarationEnd This is the position of the ';' ending the import statement
+ * or the end of the comment following the import.
+ * @param name This is the name of the import like specified in the source including the dots. The '.*'
+ * is never included in the name.
+ * @param onDemand set to true if the import is an import on demand (e.g. import java.io.*). False otherwise.
+ */
+ void acceptImport(
+ int declarationStart,
+ int declarationEnd,
+ char[] name,
+ boolean onDemand);
+ /*
+ * Table of line separator position. This table is passed once at the end
+ * of the parse action, so as to allow computation of normalized ranges.
+ *
+ * A line separator might corresponds to several characters in the source,
+ *
+ */
+ void acceptLineSeparatorPositions(int[] positions);
+ void acceptMethodReference(char[] methodName, int argCount, int sourcePosition);
+ //void acceptPackage(
+ // int declarationStart,
+ // int declarationEnd,
+ // char[] name);
+ void acceptProblem(IProblem problem);
+ void acceptTypeReference(char[][] typeName, int sourceStart, int sourceEnd);
+ void acceptTypeReference(char[] typeName, int sourcePosition);
+ void acceptUnknownReference(char[][] name, int sourceStart, int sourceEnd);
+ void acceptUnknownReference(char[] name, int sourcePosition);
+ void enterClass(
+ int declarationStart,
+ int modifiers,
+ char[] name,
+ int nameSourceStart,
+ int nameSourceEnd,
+ char[] superclass,
+ char[][] superinterfaces);
+ void enterCompilationUnit();
+ void enterConstructor(
+ int declarationStart,
+ int modifiers,
+ char[] name,
+ int nameSourceStart,
+ int nameSourceEnd,
+ char[][] parameterTypes,
+ char[][] parameterNames,
+ char[][] exceptionTypes);
+ void enterField(int declarationStart, int modifiers, char[] type, char[] name, int nameSourceStart, int nameSourceEnd);
+ //void enterInitializer(
+ // int declarationStart,
+ // int modifiers);
+ void enterInterface(
+ int declarationStart,
+ int modifiers,
+ char[] name,
+ int nameSourceStart,
+ int nameSourceEnd,
+ char[][] superinterfaces);
+ void enterMethod(
+ int declarationStart,
+ int modifiers,
+ char[] returnType,
+ char[] name,
+ int nameSourceStart,
+ int nameSourceEnd,
+ char[][] parameterTypes,
+ char[][] parameterNames,
+ char[][] exceptionTypes);
+ void exitClass(int declarationEnd);
+ void exitCompilationUnit(int declarationEnd);
+ void exitConstructor(int declarationEnd);
+ /*
+ * initializationStart denotes the source start of the expression used for initializing
+ * the field if any (-1 if no initialization).
+ */
+ void exitField(int initializationStart, int declarationEnd, int declarationSourceEnd);
+ void exitInitializer(int declarationEnd);
+ void exitInterface(int declarationEnd);
+ void exitMethod(int declarationEnd);
}