|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--scale.common.Root
|
+--scale.clef.Node
|
+--scale.clef.decl.Declaration
|
+--scale.clef.decl.RoutineDecl
This is the base class representing all routine declarations.
$Id: RoutineDecl.java,v 1.39 2002/01/03 21:42:45 burrill Exp $
Copyright 2002 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
| Fields inherited from class scale.clef.decl.Declaration |
accessibilities, cAuto, cExtern, cFile, cGlobal, cLocal, cMemory, cPrivate, cProtected, cPublic, cRegister, residencies, visibilitys |
| Fields inherited from interface scale.common.DisplayNode |
ANNO, CLEF, DD, DEFUSE, DOM, EXPR, MAYUSE, TYPE |
| Constructor Summary | |
protected |
RoutineDecl(java.lang.String name,
ProcedureType pt)
|
protected |
RoutineDecl(java.lang.String name,
ProcedureType pt,
Statement body)
Create a routine with the specified name and type. |
| Method Summary | |
protected Vector |
createChildren()
Create the list of children for the node - each node that has children must implement this method. |
protected void |
finalize()
Keep the count of instances up-to-date. |
Statement |
getBody()
|
VariableDecl |
getFtnResultVar()
Return the declared function result variable (if any). |
ProcedureType |
getSignature()
Return this routine's type |
boolean |
isMain()
Return true if the declaration is Main somewhere in the Clef AST or has a body. |
boolean |
isReferenced()
Return true if the declaration is referenced somewhere in the Clef AST or has a body. |
boolean |
isSpecification()
Return true if this is a specification of the routine. |
static int |
number()
Return the current number of instances of this class. |
void |
setBody(Statement b)
|
void |
setFtnResultVar(VariableDecl ftnResultVar)
Declare the function result variable. |
void |
setMain()
Indicates that this procedure is the main procedure. |
void |
setReferenced()
Specify that the routine is referenced somewhere in the Clef AST. |
void |
setSignature(ProcedureType s)
|
void |
setSpecification(boolean s)
|
void |
setUsesVaStart()
Specify that the routine is referenced somewhere in the Clef AST. |
java.lang.String |
toStringSpecial()
Return any special information of a node that is not a child or annotation. |
boolean |
usesVaStart()
Return true if the declaration is referenced somewhere in the Clef AST or has a body. |
void |
visit(Predicate p)
The visit() method is used to implement a visit 'pattern'. |
| Methods inherited from class scale.clef.decl.Declaration |
accessibility, addressTaken, DDname, getConstantValue, getCoreType, getDecl, getDisplayColorHint, getDisplayShapeHint, getDisplayText, getName, getParent, getScope, getScopeNode, getTag, getType, hashCode, inMemory, isFtnResultVar, isGlobal, isPure, isTemporary, isVariable, isVirtual, residency, setAccessibility, setAddressTaken, setChildParent, setName, setParent, setResidency, setScope, setTag, setType, setVisibility, visibility |
| Methods inherited from class scale.clef.Node |
getChildren, setAnnotationLevel, setReportLevel, toString, toString, toStringChildren |
| Methods inherited from class scale.common.Root |
addAnnotation, allAnnotations, allMatchingAnnotations, getAnnotation, getDisplayName, getDisplayString, getNodeCount, getNodeID, hasAnnotation, hasEqualAnnotation, removeAnnotation, removeAnnotations, toStringAnnotations, toStringClass |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected RoutineDecl(java.lang.String name,
ProcedureType pt,
Statement body)
name - is the method namept - is the method typebody - is the method body
protected RoutineDecl(java.lang.String name,
ProcedureType pt)
| Method Detail |
protected void finalize()
throws java.lang.Throwable
finalize in class Declarationjava.lang.Throwable - [needs description]public static int number()
public boolean isReferenced()
isReferenced in class Declarationscale.clef.decl.DeclarationVariableDecl,
RoutineDeclpublic void setReferenced()
setReferenced in class Declarationscale.clef.decl.DeclarationVariableDecl,
RoutineDeclpublic boolean usesVaStart()
public void setUsesVaStart()
public boolean isMain()
public void setMain()
public VariableDecl getFtnResultVar()
public void setFtnResultVar(VariableDecl ftnResultVar)
public java.lang.String toStringSpecial()
RoottoStringSpecial in class Declarationpublic void visit(Predicate p)
Nodevisit in class Declarationpublic ProcedureType getSignature()
public void setSignature(ProcedureType s)
public final boolean isSpecification()
public final void setSpecification(boolean s)
public final void setBody(Statement b)
public final Statement getBody()
protected Vector createChildren()
NodecreateChildren in class Nodescale.clef.Node
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||