/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* COMPONENT_NAME: idl.parser
*
* ORIGINS: 27
*
* Licensed Materials - Property of IBM
* 5639-D57 (C) COPYRIGHT International Business Machines Corp. 1997, 1999
* RMI-IIOP v1.0
*
*/
// NOTES:
/**
* This is the symbol table entry for interfaces.
**/
{
protected InterfaceEntry ()
{
super ();
} // ctor
{
super (that);
} // ctor
{
} // ctor
public boolean isAbstract()
{
return _interfaceType == ABSTRACT ;
}
public boolean isLocal()
{
return _interfaceType == LOCAL ;
}
public boolean isLocalServant()
{
return _interfaceType == LOCALSERVANT ;
}
public boolean isLocalSignature()
{
return _interfaceType == LOCAL_SIGNATURE_ONLY ;
}
{
return new InterfaceEntry (this);
} // clone
/** Invoke the interface generator.
@param symbolTable the symbol table is a hash table whose key is
a fully qualified type name and whose value is a SymtabEntry or
a subclass of SymtabEntry.
@param stream the stream to which the generator should sent its output.
@see SymtabEntry */
{
} // generate
/** Access the interface generator.
@returns an object which implements the InterfaceGen interface.
@see InterfaceGen */
{
return interfaceGen;
} // generator
/** Add an InterfaceEntry to the list of interfaces which this interface
is derivedFrom. During parsing, the parameter to this method COULD
be a ForwardEntry, but when parsing is complete, calling derivedFrom
will return a vector which only contains InterfaceEntry's. */
{
} // addDerivedFrom
/** This method returns a vector of InterfaceEntry's. */
{
return _derivedFrom;
} // derivedFrom
/** Add to the list of derivedFrom names. */
{
} // addDerivedFromName
/** This method returns a vector of Strings, each of which is a fully
qualified name of an interface. This vector corresponds to the
derivedFrom vector. The first element of this vector is the name
of the first element of the derivedFrom vector, etc. */
{
return _derivedFromNames;
} // derivedFromNames
{
} // addMethod
/** This is a vector of MethodEntry's. These are the methods and
attributes contained within this Interface. */
{
return _methods;
} // methods
/** Add a symbol table entry to this interface's contained vector. */
{
} // addContained
/** This is a vector of SymtabEntry's. Valid entries in this vector are:
AttributeEntry, ConstEntry, EnumEntry, ExceptionEntry, MethodEntry,
StructEntry, NativeEntry, TypedefEntry, UnionEntry.
Note that the methods vector is a subset of this vector. */
{
return _contained;
} // contained
{
{
// Add this method to the 'allMethods' list of any interfaces
// which may have inherited this one when it was a forward
// reference.
}
} // methodsAddElement
{
while (e.hasMoreElements ())
{
}
} // addToForwardedAllMethods
// Make sure a method by this name doesn't exist in this class or
// in this class's parents
{
boolean unique = true;
while (e.hasMoreElements ())
{
// Make sure the method doesn't exist either in its
// original name or in all lower case. In IDL, identifiers
// which differ only in case are collisions.
{
if (clash)
else
unique = false;
break;
}
}
return unique;
} // verifyMethod
{
addDerivedFrom (e);
addDerivedFromName (e.fullName ());
addParentType( e, scanner );
} // derivedFromAddElement
{
if (e instanceof ForwardEntry)
addToDerivers ((ForwardEntry)e);
else
{ // e instanceof InterfaceEntry
// Compare all of the parent's methods to the methods on this
// interface, looking for name clashes:
enumeration.hasMoreElements (); )
{
// Add this method to the 'allMethods' list of any interfaces
// which may have inherited this one when it was a forward
// reference:
}
// If any of the parent's parents are forward entries, make
// sure this interface gets added to their derivers list so
// that when the forward entry is defined, the 'allMethods'
// list of this interface can be updated.
}
} // addParentType
{
while (parents.hasMoreElements ())
{
if (parent instanceof ForwardEntry)
else // it must be an InterfaceEntry
}
} // lookForForwardEntrys
{
if ( index >= 0 )
return (index >= 0);
} // replaceForwardDecl
{
// Add this interface to the derivers list on the forward entry
// so that when the forward entry is defined, the 'allMethods'
// list of this interface can be updated.
while (e.hasMoreElements ())
} // addToDerivers
/** This method returns a vector of the elements in the state block.
If it is null, this is not a stateful interface. If it is non-null,
but of zero length, then it is still stateful; it has no state
entries itself, but it has an ancestor which does. */
{
return _state;
} // state
public void initState ()
{
} // initState
{
} // state
public int getInterfaceType ()
{
return _interfaceType;
}
{
}
/** Get the allMethods vector. */
{
return _allMethods;
}
} // class InterfaceEntry