001: /*
002: * Copyright 1999-2001 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.toJava
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: * @(#)MethodGenClone24.java 1.19 07/05/05
035: */
036:
037: package com.sun.tools.corba.se.idl.toJavaPortable;
038:
039: // NOTES:
040: // -D62023 <klr> New file to implement CORBA 2.4 RTF
041: // NOTE: The methods in this class should be exact copies of the
042: // correspoind methods in MethodGen24. The purpose of this class is
043: // to inject the changes made in MethodGen24 between AttributeGen
044: // and AttributeGen24. When the AttributeGen24 changes are merged, this
045: // class should be deleted.
046:
047: import java.io.PrintWriter;
048:
049: import java.util.Enumeration;
050: import java.util.Vector;
051: import java.util.Hashtable;
052:
053: import com.sun.tools.corba.se.idl.GenFileStream;
054: import com.sun.tools.corba.se.idl.InterfaceEntry;
055: import com.sun.tools.corba.se.idl.MethodEntry;
056: import com.sun.tools.corba.se.idl.ParameterEntry;
057: import com.sun.tools.corba.se.idl.SymtabEntry;
058: import com.sun.tools.corba.se.idl.ValueEntry;
059: import com.sun.tools.corba.se.idl.ValueBoxEntry;
060: import com.sun.tools.corba.se.idl.TypedefEntry;
061: import com.sun.tools.corba.se.idl.InterfaceState;
062: import com.sun.tools.corba.se.idl.PrimitiveEntry;
063: import com.sun.tools.corba.se.idl.StructEntry;
064:
065: /**
066: *
067: **/
068: public class MethodGenClone24 extends AttributeGen {
069: /**
070: * Public zero-argument constructor.
071: **/
072: public MethodGenClone24() {
073: } // ctor
074:
075: /**
076: * <d62023> - write an abstract method definition
077: **/
078: protected void abstractMethod(Hashtable symbolTable, MethodEntry m,
079: PrintWriter stream) {
080: this .symbolTable = symbolTable;
081: this .m = m;
082: this .stream = stream;
083: if (m.comment() != null)
084: m.comment().generate(" ", stream);
085: stream.print(" ");
086: stream.print("public abstract ");
087: writeMethodSignature();
088: stream.println(";");
089: stream.println();
090: } // abstractMethod
091:
092: /**
093: * <d62023> - delete method templates for valuetypes
094: **/
095: protected void interfaceMethod(Hashtable symbolTable,
096: MethodEntry m, PrintWriter stream) {
097: this .symbolTable = symbolTable;
098: this .m = m;
099: this .stream = stream;
100: if (m.comment() != null)
101: m.comment().generate(" ", stream);
102: stream.print(" ");
103: writeMethodSignature();
104: stream.println(";");
105: } // interfaceMethod
106: }
|