Package com.sun.tools.corba.ee.idl
Class InterfaceEntry
- java.lang.Object
-
- com.sun.tools.corba.ee.idl.SymtabEntry
-
- com.sun.tools.corba.ee.idl.InterfaceEntry
-
- All Implemented Interfaces:
InterfaceType
- Direct Known Subclasses:
ValueEntry
public class InterfaceEntry extends SymtabEntry implements InterfaceType
This is the symbol table entry for interfaces.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.Vector<MethodEntry>_allMethodsprivate java.util.Vector<SymtabEntry>_containedprivate java.util.Vector<SymtabEntry>_derivedFromprivate java.util.Vector<java.lang.String>_derivedFromNamesprivate int_interfaceTypeprivate java.util.Vector<MethodEntry>_methodsprivate java.util.Vector<InterfaceState>_state(package private) java.util.Vector<InterfaceEntry>forwardedDerivers(package private) static InterfaceGeninterfaceGen-
Fields inherited from class com.sun.tools.corba.ee.idl.SymtabEntry
includeStack, maxKey, setEmit
-
Fields inherited from interface com.sun.tools.corba.ee.idl.InterfaceType
ABSTRACT, LOCAL, LOCAL_SIGNATURE_ONLY, LOCALSERVANT, NORMAL
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedInterfaceEntry()protectedInterfaceEntry(InterfaceEntry that)protectedInterfaceEntry(SymtabEntry that, IDLID clone)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddContained(SymtabEntry entry)Add a symbol table entry to this interface's contained vector.voidaddDerivedFrom(SymtabEntry derivedFrom)Add an InterfaceEntry to the list of interfaces which this interface is derivedFrom.voidaddDerivedFromName(java.lang.String name)Add to the list of derivedFrom names.voidaddMethod(MethodEntry method)Add a method/attribute to the list of methods.(package private) voidaddParentType(SymtabEntry e, Scanner scanner)voidaddStateElement(InterfaceState state, Scanner scanner)private voidaddToDerivers(ForwardEntry forward)(package private) voidaddToForwardedAllMethods(MethodEntry method, Scanner scanner)java.util.Vector<MethodEntry>allMethods()Get the allMethods vector.java.lang.Objectclone()This is a shallow copy clonejava.util.Vector<SymtabEntry>contained()This is a vector of SymtabEntry's.java.util.Vector<SymtabEntry>derivedFrom()This method returns a vector of InterfaceEntry's.(package private) voidderivedFromAddElement(SymtabEntry e, Scanner scanner)java.util.Vector<java.lang.String>derivedFromNames()This method returns a vector of Strings, each of which is a fully qualified name of an interface.voidgenerate(java.util.Hashtable symbolTable, java.io.PrintWriter stream)Invoke the interface generator.Generatorgenerator()Access the interface generator.intgetInterfaceType()voidinitState()booleanisAbstract()booleanisLocal()booleanisLocalServant()booleanisLocalSignature()private voidlookForForwardEntrys(Scanner scanner, InterfaceEntry entry)java.util.Vector<MethodEntry>methods()This is a vector of MethodEntry's.(package private) voidmethodsAddElement(MethodEntry method, Scanner scanner)booleanreplaceForwardDecl(ForwardEntry oldEntry, InterfaceEntry newEntry)voidsetInterfaceType(int type)java.util.Vector<InterfaceState>state()This method returns a vector of the elements in the state block.private booleanverifyMethod(MethodEntry method, Scanner scanner, boolean clash)-
Methods inherited from class com.sun.tools.corba.ee.idl.SymtabEntry
comment, comment, container, container, dynamicVariable, dynamicVariable, emit, emit, enteringInclude, exitingInclude, fullName, getVariableKey, growVars, initDynamicVars, isReferencable, isReferencable, module, module, name, name, repositoryID, repositoryID, sourceFile, sourceFile, type, type, typeName, typeName
-
-
-
-
Field Detail
-
_derivedFromNames
private java.util.Vector<java.lang.String> _derivedFromNames
-
_derivedFrom
private java.util.Vector<SymtabEntry> _derivedFrom
-
_methods
private java.util.Vector<MethodEntry> _methods
-
_allMethods
java.util.Vector<MethodEntry> _allMethods
-
forwardedDerivers
java.util.Vector<InterfaceEntry> forwardedDerivers
-
_contained
private java.util.Vector<SymtabEntry> _contained
-
_state
private java.util.Vector<InterfaceState> _state
-
_interfaceType
private int _interfaceType
-
interfaceGen
static InterfaceGen interfaceGen
-
-
Constructor Detail
-
InterfaceEntry
protected InterfaceEntry()
-
InterfaceEntry
protected InterfaceEntry(InterfaceEntry that)
-
InterfaceEntry
protected InterfaceEntry(SymtabEntry that, IDLID clone)
-
-
Method Detail
-
isAbstract
public boolean isAbstract()
-
isLocal
public boolean isLocal()
-
isLocalServant
public boolean isLocalServant()
-
isLocalSignature
public boolean isLocalSignature()
-
clone
public java.lang.Object clone()
Description copied from class:SymtabEntryThis is a shallow copy clone- Overrides:
clonein classSymtabEntry
-
generate
public void generate(java.util.Hashtable symbolTable, java.io.PrintWriter stream)Invoke the interface generator.- Overrides:
generatein classSymtabEntry- Parameters:
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.stream- the stream to which the generator should sent its output.- See Also:
SymtabEntry
-
generator
public Generator generator()
Access the interface generator.- Overrides:
generatorin classSymtabEntry- Returns:
- an object which implements the InterfaceGen interface.
- See Also:
InterfaceGen
-
addDerivedFrom
public void addDerivedFrom(SymtabEntry derivedFrom)
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.- Parameters:
derivedFrom- aForwardEntryorInterfaceEntry
-
derivedFrom
public java.util.Vector<SymtabEntry> derivedFrom()
This method returns a vector of InterfaceEntry's.- Returns:
- a
Vectorof interfaces which this interface is derived from - See Also:
addDerivedFromName(java.lang.String)
-
addDerivedFromName
public void addDerivedFromName(java.lang.String name)
Add to the list of derivedFrom names.
-
derivedFromNames
public java.util.Vector<java.lang.String> derivedFromNames()
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.- Returns:
VectorofStrings
-
addMethod
public void addMethod(MethodEntry method)
Add a method/attribute to the list of methods.- Parameters:
method- method or attribute to add
-
methods
public java.util.Vector<MethodEntry> methods()
This is a vector of MethodEntry's. These are the methods and attributes contained within this Interface.- Returns:
VectorofMethodEntry
-
addContained
public void addContained(SymtabEntry entry)
Add a symbol table entry to this interface's contained vector.- Parameters:
entry- newSymtabEntryto add
-
contained
public java.util.Vector<SymtabEntry> contained()
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.- Returns:
VectorofSymtabEntry- See Also:
methods()
-
methodsAddElement
void methodsAddElement(MethodEntry method, Scanner scanner)
-
addToForwardedAllMethods
void addToForwardedAllMethods(MethodEntry method, Scanner scanner)
-
verifyMethod
private boolean verifyMethod(MethodEntry method, Scanner scanner, boolean clash)
-
derivedFromAddElement
void derivedFromAddElement(SymtabEntry e, Scanner scanner)
-
addParentType
void addParentType(SymtabEntry e, Scanner scanner)
-
lookForForwardEntrys
private void lookForForwardEntrys(Scanner scanner, InterfaceEntry entry)
-
replaceForwardDecl
public boolean replaceForwardDecl(ForwardEntry oldEntry, InterfaceEntry newEntry)
-
addToDerivers
private void addToDerivers(ForwardEntry forward)
-
state
public java.util.Vector<InterfaceState> state()
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.- Returns:
- Vector of
InterfaceState
-
initState
public void initState()
-
addStateElement
public void addStateElement(InterfaceState state, Scanner scanner)
-
getInterfaceType
public int getInterfaceType()
- Specified by:
getInterfaceTypein interfaceInterfaceType
-
setInterfaceType
public void setInterfaceType(int type)
- Specified by:
setInterfaceTypein interfaceInterfaceType
-
allMethods
public java.util.Vector<MethodEntry> allMethods()
Get the allMethods vector.- Returns:
- Vector of all methods in the interface
- See Also:
MethodEntry
-
-