scale.clef.type
Class SuperType

java.lang.Object
  |
  +--scale.common.Root
        |
        +--scale.clef.Node
              |
              +--scale.clef.type.SuperType
All Implemented Interfaces:
AnnotationInterface, DisplayNode, java.io.Serializable

public class SuperType
extends Node

This class represents a base class in the definition of a class.

$Id: SuperType.java,v 1.32 2002/01/03 21:44:14 burrill Exp $

Copyright 2002 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.

NOTE: Despite the name of this class, it is not a type node!

See Also:
Serialized Form

Fields inherited from interface scale.common.DisplayNode
ANNO, CLEF, DD, DEFUSE, DOM, EXPR, MAYUSE, TYPE
 
Constructor Summary
SuperType(Declaration d, int a, boolean isVirtual)
           
 
Method Summary
 int accessibility()
          Return the declaration accessibility.
 Declaration getDecl()
          Retun any Declaration associated with this Node.
 Node getParent()
          Return my parent in the Clef tree if any.
 boolean isVirtual()
          Return the field isVirtual which indicates if the base class has been declared virtual (virtual means that a single subobject of the virtual base class is shared by every base class that specifies the base class to be virtual.
 void setAccessibility(int accessibility)
          Specify the accessibility of the declaration.
protected  void setClass(Declaration d)
           
 void setParent(Node p)
          Not all nodes have parents in the CLEF AST since it is really a DAG and not a tree structure.
 java.lang.String toStringSpecial()
          Return any special information of a node that is not a child or annotation.
 void visit(Predicate p)
          The visit() method is used to implement a visit 'pattern'.
 
Methods inherited from class scale.clef.Node
createChildren, getChildren, getCoreType, getType, setAnnotationLevel, setReportLevel, toString, toString, toStringChildren
 
Methods inherited from class scale.common.Root
addAnnotation, allAnnotations, allMatchingAnnotations, getAnnotation, getDisplayColorHint, getDisplayName, getDisplayShapeHint, getDisplayString, getDisplayText, getNodeCount, getNodeID, hasAnnotation, hasEqualAnnotation, hashCode, removeAnnotation, removeAnnotations, toStringAnnotations, toStringClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SuperType

public SuperType(Declaration d,
                 int a,
                 boolean isVirtual)
Method Detail

setAccessibility

public void setAccessibility(int accessibility)
Specify the accessibility of the declaration.
Parameters:
accessibility - is the accessibility of the declaration
See Also:
Declaration.cPublic, Declaration.cProtected, Declaration.cPrivate

accessibility

public int accessibility()
Return the declaration accessibility. Accessibility is public, private, or protected.
See Also:
Declaration.cPublic, Declaration.cProtected, Declaration.cPrivate

getParent

public final Node getParent()
Return my parent in the Clef tree if any.
Overrides:
getParent in class Node
Following copied from class: scale.clef.Node
Returns:
my parent in the Clef tree if any

setParent

public void setParent(Node p)
Description copied from class: Node
Not all nodes have parents in the CLEF AST since it is really a DAG and not a tree structure. Generate an error unless this method is defined for the derived class.
Overrides:
setParent in class Node
Parameters:
p - my parent in the Clef tree

getDecl

public final Declaration getDecl()
Description copied from class: Node
Retun any Declaration associated with this Node.
Overrides:
getDecl in class Node

isVirtual

public final boolean isVirtual()
Return the field isVirtual which indicates if the base class has been declared virtual (virtual means that a single subobject of the virtual base class is shared by every base class that specifies the base class to be virtual.
Returns:
true if the base class is virtual, false otherwise

toStringSpecial

public java.lang.String toStringSpecial()
Description copied from class: Root
Return any special information of a node that is not a child or annotation. This method is meant to be overridden by nodes that need to provide special output.
Overrides:
toStringSpecial in class Node

visit

public void visit(Predicate p)
Description copied from class: Node
The visit() method is used to implement a visit 'pattern'.
Overrides:
visit in class Node

setClass

protected final void setClass(Declaration d)