gov.llnl.babel.symbols

Class Interface

Implemented Interfaces:
Comparable, Attributes, Comparable, IMetadata

public class Interface
extends Extendable

Class Interface defines a sidl interface. All the basic functionality for this class is implemented by the parent extendable class.

Field Summary

Fields inherited from class gov.llnl.babel.symbols.Symbol

CLASS, ENUM, INTERFACE, PACKAGE, SCOPE, STRUCT, d_context, s_type

Fields inherited from class gov.llnl.babel.symbols.SymbolID

SCOPE

Fields inherited from class gov.llnl.babel.symbols.ASTNode

d_frozen

Constructor Summary

Interface(SymbolID id, Comment comment, Context context)
Create an empty Interface object that will be constructed by calls to other member functions.
Interface(SymbolID id, Comment comment, Metadata metadata, Context context)
Create an empty Interface object that will be constructed by calls to other member functions.

Method Summary

void
addParentInterface(Interface parent)
Add a parent interface to this interface.
Class
generateAnonymousClass()
generateAnonymousClass generates the anonymous class for this Interface.
int
getDepth()
boolean
hasStaticMethod(boolean all)
Return whether this interface has any static methods (always false).
boolean
isAbstract()
Return whether this interface is abstract.
boolean
isInterface()
Return whether this object represents an interface (true).

Methods inherited from class gov.llnl.babel.symbols.Extendable

addInvariant, addMethod, addParentData, addParentInterface, addRenamedMethod, freeze, getAbstractAndLocalMethods, getAbstractMethods, getAllInvariants, getAllParentsInOrder, getAllPostconditions, getAllPreconditions, getAllSymbolReferences, getBasicArrayRefs, getInvariants, getMethods, getMethodsWithNonblocking, getNewMethod, getNewMethods, getNonstaticMethods, getNumberAssertions, getNumberInvariants, getNumberOfMethods, getNumberPostconditions, getNumberPreconditions, getObjectDependencies, getOverloadedMethodsByName, getParentInterface, getParentInterfaces, getParents, getRenamedMethod, getRenamedMethodSymbolID, getRenamedMethods, getStaticMethods, getSymbolReferences, hasAncestor, hasAssertions, hasExceptionThrowingMethod, hasInvariants, hasMethodByLongName, hasMethodByShortName, hasParentInterface, hasParentInterfaces, hasReservedMethodAssertion, hasStaticMethod, isAbstract, isInterface, isLocal, lookupMethodByLongName, lookupMethodByShortName, methodWasRenamed, validateAssertions, validateInvariants, validatePostconditions, validatePostconditions, validatePostconditions, validatePreconditions, validatePreconditions, validatePreconditions

Methods inherited from class gov.llnl.babel.symbols.Symbol

addMetadata, freeze, getAllSymbolReferences, getAttribute, getAttributes, getBasicArrayRefs, getComment, getDepth, getMetadata, getSymbolID, getSymbolReferences, getSymbolType, getSymbolTypeString, getUserSpecified, hasAttribute, isClass, isInterface, isPackage, isStruct, minimumDepth, removeAttribute, setAttribute, setAttribute, setComment, setUserSpecified

Methods inherited from class gov.llnl.babel.symbols.SymbolID

compareTo, equals, fromXML, getFullName, getShortName, getShortName, getSymbolName, getVersion, hashCode, setFromXML

Methods inherited from class gov.llnl.babel.symbols.ASTNode

checkFrozen, clone, freeze, protectCollection, protectList, protectMap, protectSet

Constructor Details

Interface

public Interface(SymbolID id,
                 Comment comment,
                 Context context)
Create an empty Interface object that will be constructed by calls to other member functions.

Interface

public Interface(SymbolID id,
                 Comment comment,
                 Metadata metadata,
                 Context context)
Create an empty Interface object that will be constructed by calls to other member functions.

Method Details

addParentInterface

public void addParentInterface(Interface parent)
Add a parent interface to this interface. This method does not check that the interfaces and methods are compatible; it simply copies the methods and interface parents and adds them to this interface.
Overrides:
addParentInterface in interface Extendable

generateAnonymousClass

public Class generateAnonymousClass()
            throws CodeGenerationException
generateAnonymousClass generates the anonymous class for this Interface. This anonymous class is only used to connect an interface remotely.

getDepth

public int getDepth()
Overrides:
getDepth in interface Symbol

hasStaticMethod

public boolean hasStaticMethod(boolean all)
Return whether this interface has any static methods (always false).
Overrides:
hasStaticMethod in interface Extendable

isAbstract

public boolean isAbstract()
Return whether this interface is abstract. An interface is always abstract, even if it contains no methods.
Overrides:
isAbstract in interface Extendable

isInterface

public boolean isInterface()
Return whether this object represents an interface (true).
Overrides:
isInterface in interface Extendable