gov.llnl.babel.symbols
Class Interface

java.lang.Object
  extended bygov.llnl.babel.symbols.ASTNode
      extended bygov.llnl.babel.symbols.Symbol
          extended bygov.llnl.babel.symbols.Extendable
              extended bygov.llnl.babel.symbols.Interface
All Implemented Interfaces:
java.lang.Comparable

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, s_type, SCOPE
 
Constructor Summary
Interface(SymbolID id, Comment comment)
          Create an empty Interface object that will be constructed by calls to other member functions.
Interface(SymbolID id, Comment comment, Metadata metadata)
          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.
 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, getAbstractAndLocalMethods, getAbstractMethods, getAllInvariants, getAllParentsInOrder, getAllPostconditions, getAllPreconditions, getAllSymbolReferences, getBasicArrayRefs, getInvariants, getMethods, getNonstaticMethods, getNumberAssertions, getNumberInvariants, getNumberOfMethods, getNumberPostconditions, getNumberPreconditions, getObjectDependencies, getOverloadedMethodsByName, getParentInterfaces, getParents, getStaticMethods, getSymbolReferences, hasAncestor, hasAssertions, hasExceptionThrowingMethod, hasInvariants, hasMethodByLongName, hasMethodByShortName, hasParentInterface, hasReservedMethodAssertion, isLocal, lookupMethodByLongName, lookupMethodByShortName, validateAssertions, validateInvariants, validatePostconditions, validatePostconditions, validatePostconditions, validatePreconditions, validatePreconditions, validatePreconditions
 
Methods inherited from class gov.llnl.babel.symbols.Symbol
addMetadata, compareTo, getComment, getFullName, getMetadata, getSymbolID, getSymbolType, getSymbolTypeString, getUserSpecified, isPackage, setComment, setUserSpecified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Interface

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


Interface

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

Method Detail

isAbstract

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

Specified by:
isAbstract in class Extendable

isInterface

public boolean isInterface()
Return whether this object represents an interface (true).

Specified by:
isInterface in class Extendable

hasStaticMethod

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

Specified by:
hasStaticMethod in class Extendable
Parameters:
all - If TRUE, then local and parent methods are to be searched; otherwise, only local methods are to be searched.

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.

Specified by:
addParentInterface in class Extendable
Parameters:
parent - The parent interface to be added to this object.