0N/A/*
2362N/A * Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage sun.tools.java;
0N/A
0N/Aimport sun.tools.tree.*;
0N/A
0N/A/**
0N/A * This is the protocol by which a Parser makes callbacks
0N/A * to the later phases of the compiler.
0N/A * <p>
0N/A * (As a backwards compatibility trick, Parser implements
0N/A * this protocol, so that an instance of a Parser subclass
0N/A * can handle its own actions. The preferred way to use a
0N/A * Parser, however, is to instantiate it directly with a
0N/A * reference to your own ParserActions implementation.)
0N/A *
0N/A * WARNING: The contents of this source file are not part of any
0N/A * supported API. Code that depends on them does so at its own risk:
0N/A * they are subject to change or removal without notice.
0N/A *
0N/A * @author John R. Rose
0N/A */
0N/Apublic interface ParserActions {
0N/A /**
0N/A * package declaration
0N/A */
0N/A void packageDeclaration(long off, IdentifierToken nm);
0N/A
0N/A /**
0N/A * import class
0N/A */
0N/A void importClass(long off, IdentifierToken nm);
0N/A
0N/A /**
0N/A * import package
0N/A */
0N/A void importPackage(long off, IdentifierToken nm);
0N/A
0N/A /**
0N/A * Define class
0N/A * @return a cookie for the class
0N/A * This cookie is used by the parser when calling defineField
0N/A * and endClass, and is not examined otherwise.
0N/A */
0N/A ClassDefinition beginClass(long off, String doc,
0N/A int mod, IdentifierToken nm,
0N/A IdentifierToken sup, IdentifierToken impl[]);
0N/A
0N/A
0N/A /**
0N/A * End class
0N/A * @param c a cookie returned by the corresponding beginClass call
0N/A */
0N/A void endClass(long off, ClassDefinition c);
0N/A
0N/A /**
0N/A * Define a field
0N/A * @param c a cookie returned by the corresponding beginClass call
0N/A */
0N/A void defineField(long where, ClassDefinition c,
0N/A String doc, int mod, Type t,
0N/A IdentifierToken nm, IdentifierToken args[],
0N/A IdentifierToken exp[], Node val);
0N/A}