PragmaEntry.java revision 608:7e06bf1dcb09
1139749Simp/* 2139749Simp * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. 361108Scg * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 461108Scg * 561108Scg * This code is free software; you can redistribute it and/or modify it 661108Scg * under the terms of the GNU General Public License version 2 only, as 761108Scg * published by the Free Software Foundation. Oracle designates this 861108Scg * particular file as subject to the "Classpath" exception as provided 961108Scg * by Oracle in the LICENSE file that accompanied this code. 1077495Scg * 1177495Scg * This code is distributed in the hope that it will be useful, but WITHOUT 1277495Scg * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1377495Scg * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1477495Scg * version 2 for more details (a copy is included in the LICENSE file that 1577495Scg * accompanied this code). 1677495Scg * 1777495Scg * You should have received a copy of the GNU General Public License version 1877495Scg * 2 along with this work; if not, write to the Free Software Foundation, 1977495Scg * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2077495Scg * 2177495Scg * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2277495Scg * or visit www.oracle.com if you need additional information or have any 2377495Scg * questions. 2477495Scg */ 2577495Scg/* 2677495Scg * COMPONENT_NAME: idl.parser 2777495Scg * 2877495Scg * ORIGINS: 27 2977495Scg * 3077506Scg * Licensed Materials - Property of IBM 3177495Scg * 5639-D57 (C) COPYRIGHT International Business Machines Corp. 1997, 1999 3277495Scg * RMI-IIOP v1.0 3361108Scg * 3461108Scg */ 3561108Scg 3661108Scgpackage com.sun.tools.corba.se.idl; 3761108Scg 3861108Scg// NOTES: 3961108Scg 4061108Scgimport java.io.PrintWriter; 4161108Scgimport java.util.Hashtable; 4261108Scg 4361108Scg/** 4461108Scg * This is the symbol table entry for the #pragma statement. 4561108Scg **/ 4661108Scgpublic class PragmaEntry extends SymtabEntry 4761108Scg{ 4861108Scg protected PragmaEntry () 4961108Scg { 5061108Scg super (); 5161108Scg repositoryID (Util.emptyID); 5261108Scg } // ctor 5361108Scg 5461108Scg protected PragmaEntry (SymtabEntry that) 5561108Scg { 5661108Scg super (that, new IDLID ()); 5761108Scg module (that.name ()); 5861108Scg name (""); 5961108Scg } // ctor 6061108Scg 6161108Scg protected PragmaEntry (PragmaEntry that) 6261108Scg { 6361108Scg super (that); 6461108Scg } // ctor 6561108Scg 6661108Scg public Object clone () 6761108Scg { 6861108Scg return new PragmaEntry (this); 6961108Scg } // clone 7061108Scg 7161108Scg /** Invoke the Include type generator. 7261108Scg @param symbolTable the symbol table is a hash table whose key is 7361108Scg a fully qualified type name and whose value is a SymtabEntry or 7461108Scg a subclass of SymtabEntry. 7561108Scg @param stream the stream to which the generator should sent its output. 7661108Scg @see SymtabEntry */ 7761108Scg public void generate (Hashtable symbolTable, PrintWriter stream) 7861108Scg { 7961108Scg pragmaGen.generate (symbolTable, this, stream); 8061108Scg } // generate 8161108Scg 8261108Scg /** Access the Include type generator. 8361108Scg @returns an object which implements the IncludeGen interface. 8461108Scg @see IncludeGen */ 8561108Scg public Generator generator () 8661108Scg { 8761108Scg return pragmaGen; 8861108Scg } // generator 8961108Scg 9061108Scg public String data () 9161108Scg { 9261108Scg return _data; 9361108Scg } // data 9461108Scg 9561108Scg public void data (String newData) 9661108Scg { 9761108Scg _data = newData; 9861108Scg } // data 9961108Scg 10061108Scg static PragmaGen pragmaGen; 10161108Scg 10261108Scg private String _data = null; 10361108Scg} // class PragmaEntry 10461108Scg