0N/A/*
157N/A * Copyright (c) 1999, 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
157N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
157N/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 *
157N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
157N/A * or visit www.oracle.com if you need additional information or have any
157N/A * questions.
0N/A */
0N/A/*
0N/A * COMPONENT_NAME: idl.parser
0N/A *
0N/A * ORIGINS: 27
0N/A *
0N/A * Licensed Materials - Property of IBM
0N/A * 5639-D57 (C) COPYRIGHT International Business Machines Corp. 1997, 1999
0N/A * RMI-IIOP v1.0
0N/A *
0N/A */
0N/A
0N/Apackage com.sun.tools.corba.se.idl;
0N/A
0N/A// NOTES:
0N/A
0N/Aimport java.io.PrintWriter;
0N/Aimport java.util.Hashtable;
0N/A
0N/A/**
0N/A * This is the symbol table entry for attributes. An attribute is simply
0N/A * two methods with no exceptions or contexts: a get method and, if not
0N/A * readOnly, a set method.
0N/A **/
0N/Apublic class AttributeEntry extends MethodEntry
0N/A{
0N/A protected AttributeEntry ()
0N/A {
0N/A super ();
0N/A } // ctor
0N/A
0N/A protected AttributeEntry (AttributeEntry that)
0N/A {
0N/A super (that);
0N/A _readOnly = that._readOnly;
0N/A } // ctor
0N/A
0N/A protected AttributeEntry (InterfaceEntry that, IDLID clone)
0N/A {
0N/A super (that, clone);
0N/A } // ctor
0N/A
0N/A public Object clone ()
0N/A {
0N/A return new AttributeEntry (this);
0N/A } // clone
0N/A
0N/A /** Invoke the attribute generator.
0N/A @param symbolTable the symbol table is a hash table whose key is
0N/A a fully qualified type name and whose value is a SymtabEntry or
0N/A a subclass of SymtabEntry.
0N/A @param stream the stream to which the generator should sent its output.
0N/A @see SymtabEntry */
0N/A public void generate (Hashtable symbolTable, PrintWriter stream)
0N/A {
0N/A attributeGen.generate (symbolTable, this, stream);
0N/A } // generate
0N/A
0N/A /** Access the attribute generator.
0N/A @returns an object which implements the AttributeGen interface.
0N/A @see AttributeGen */
0N/A public Generator generator ()
0N/A {
0N/A return attributeGen;
0N/A } // generator
0N/A
0N/A /** if true, only a get method will be generated. */
0N/A public boolean readOnly ()
0N/A {
0N/A return _readOnly;
0N/A } // readOnly
0N/A
0N/A /** if true, only a get method will be generated. */
0N/A public void readOnly (boolean readOnly)
0N/A {
0N/A _readOnly = readOnly;
0N/A } // readOnly
0N/A
0N/A static AttributeGen attributeGen;
0N/A
0N/A public boolean _readOnly = false;
0N/A} // class AttributeEntry