gov.llnl.babel.symbols
Class Class

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

public class Class
extends Extendable

Class Class defines a sidl class. Most of the basic functionality for this class is implemented by Extendable. This class adds the capability to be extended by a parent class.


Field Summary
 
Fields inherited from class gov.llnl.babel.symbols.Symbol
CLASS, ENUM, INTERFACE, PACKAGE, s_type, SCOPE
 
Constructor Summary
Class(SymbolID id, Comment comment)
          Create an empty Class object that will be constructed by calls to other member functions.
Class(SymbolID id, Comment comment, Metadata metadata)
          Create an empty Class object that will be constructed by calls to other member functions.
 
Method Summary
 void addParentInterface(Interface parent)
          Add a parent interface to this class.
 Class getParentClass()
           
 java.util.Collection getParents(boolean all)
          Return the parent interfaces and parent class (if any) in a Collection.
 boolean hasParentClass(SymbolID id, boolean all)
           
 boolean hasStaticMethod(boolean all)
          Return whether this class has any static methods.
 boolean isAbstract()
          Return whether this class is abstract.
 boolean isInterface()
          Return whether this object represents an interface (false).
 void setParentClass(Class parent)
           
 
Methods inherited from class gov.llnl.babel.symbols.Extendable
addMethod, addParentData, getAbstractMethods, getAllSymbolReferences, getBasicArrayRefs, getMethods, getNonstaticMethods, getParentInterfaces, getStaticMethods, getSymbolReferences, hasAncestor, hasExceptionThrowingMethod, hasMethodByLongName, hasMethodByShortName, hasParentInterface, isLocal, lookupMethodByLongName, lookupMethodByShortName
 
Methods inherited from class gov.llnl.babel.symbols.Symbol
addMetadata, compareTo, getComment, getFullName, getMetadata, getSymbolID, getSymbolType, getSymbolTypeString, getUserSpecified, setComment, setUserSpecified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Class

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


Class

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

Method Detail

isAbstract

public boolean isAbstract()
Return whether this class is abstract. A class is abstract if and only if it has one or more abstract methods.

Specified by:
isAbstract in class Extendable

isInterface

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

Specified by:
isInterface in class Extendable

hasStaticMethod

public boolean hasStaticMethod(boolean all)
Return whether this class has any static methods. If the flag is true, then determines from all locally defined and parent methods.

Specified by:
hasStaticMethod in class Extendable

addParentInterface

public void addParentInterface(Interface parent)
Add a parent interface to this class. 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

setParentClass

public void setParentClass(Class parent)

getParentClass

public Class getParentClass()

getParents

public java.util.Collection getParents(boolean all)
Return the parent interfaces and parent class (if any) in a Collection.

Overrides:
getParents in class Extendable

hasParentClass

public boolean hasParentClass(SymbolID id,
                              boolean all)