Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/sun/rmi/rmic/Generator.java
38831 views
/*1* Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425/*26* Licensed Materials - Property of IBM27* RMI-IIOP v1.028* Copyright IBM Corp. 1998 1999 All Rights Reserved29*30*/3132package sun.rmi.rmic;3334import java.io.File;35import sun.tools.java.ClassDefinition;3637/**38* Generator defines the protocol for back-end implementations to be added39* to rmic. See the rmic.properties file for a description of the format for40* adding new Generators to rmic.41* <p>42* Classes implementing this interface must have a public default constructor43* which should set any required arguments to their defaults. When Main44* encounters a command line argument which maps to a specific Generator45* subclass, it will instantiate one and call parseArgs(...). At some later46* point, Main will invoke the generate(...) method once for _each_ class passed47* on the command line.48*49* WARNING: The contents of this source file are not part of any50* supported API. Code that depends on them does so at its own risk:51* they are subject to change or removal without notice.52*53* @author Bryan Atsatt54*/55public interface Generator {5657/**58* Examine and consume command line arguments.59* @param argv The command line arguments. Ignore null60* and unknown arguments. Set each consumed argument to null.61* @param main Report any errors using the main.error() methods.62* @return true if no errors, false otherwise.63*/64public boolean parseArgs(String argv[], Main main);6566/**67* Generate output. Any source files created which need compilation should68* be added to the compiler environment using the addGeneratedFile(File)69* method.70*71* @param env The compiler environment72* @param cdef The definition for the implementation class or interface from73* which to generate output74* @param destDir The directory for the root of the package hierarchy75* for generated files. May be null.76*/77public void generate(BatchEnvironment env, ClassDefinition cdef, File destDir);78}798081