001: /*
002: * Copyright 1999-2000 Sun Microsystems, Inc. All Rights Reserved.
003: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004: *
005: * This code is free software; you can redistribute it and/or modify it
006: * under the terms of the GNU General Public License version 2 only, as
007: * published by the Free Software Foundation. Sun designates this
008: * particular file as subject to the "Classpath" exception as provided
009: * by Sun in the LICENSE file that accompanied this code.
010: *
011: * This code is distributed in the hope that it will be useful, but WITHOUT
012: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
014: * version 2 for more details (a copy is included in the LICENSE file that
015: * accompanied this code).
016: *
017: * You should have received a copy of the GNU General Public License version
018: * 2 along with this work; if not, write to the Free Software Foundation,
019: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020: *
021: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022: * CA 95054 USA or visit www.sun.com if you need additional information or
023: * have any questions.
024: */
025: /*
026: * COMPONENT_NAME: idl.parser
027: *
028: * ORIGINS: 27
029: *
030: * Licensed Materials - Property of IBM
031: * 5639-D57 (C) COPYRIGHT International Business Machines Corp. 1997, 1999
032: * RMI-IIOP v1.0
033: *
034: * @(#)GenFactory.java 1.20 07/05/05
035: */
036:
037: package com.sun.tools.corba.se.idl;
038:
039: // NOTES:
040:
041: /**
042: * To extend this compiler framework to generate something other than
043: * the default, this factory interface must be implemented and the name
044: * of it must be set in the main method (see idl.Compile).
045: * <p>
046: * The implementation of each method should be quite simple. Take
047: * createAttributeGen, for instance. If the interface AttributeGen is
048: * implemented by a class called MyAttributeGen, then createAttributeGen
049: * will be the following:
050: * <pre>
051: * public AttributeGen createAttributeGen ()
052: * {
053: * return new MyAttributeGen ();
054: * }
055: * </pre>
056: * <p>
057: * If it is desired that a generator do nothing, it is not necessary to
058: * implement one which does nothing; you may simply write that particular
059: * create method so that it returns null.
060: * <p>
061: * Note that this class MUST have a public default constructor (one which
062: * takes no parameters).
063: **/
064: public interface GenFactory {
065: public AttributeGen createAttributeGen();
066:
067: public ConstGen createConstGen();
068:
069: public EnumGen createEnumGen();
070:
071: public ExceptionGen createExceptionGen();
072:
073: public ForwardGen createForwardGen();
074:
075: public ForwardValueGen createForwardValueGen();
076:
077: public IncludeGen createIncludeGen();
078:
079: public InterfaceGen createInterfaceGen();
080:
081: public ValueGen createValueGen();
082:
083: public ValueBoxGen createValueBoxGen();
084:
085: public MethodGen createMethodGen();
086:
087: public ModuleGen createModuleGen();
088:
089: public NativeGen createNativeGen();
090:
091: public ParameterGen createParameterGen();
092:
093: public PragmaGen createPragmaGen();
094:
095: public PrimitiveGen createPrimitiveGen();
096:
097: public SequenceGen createSequenceGen();
098:
099: public StringGen createStringGen();
100:
101: public StructGen createStructGen();
102:
103: public TypedefGen createTypedefGen();
104:
105: public UnionGen createUnionGen();
106: } // interface GenFactory
|