cetus.hir
Class ProcedureDeclarator

java.lang.Object
  extended by cetus.hir.Declarator
      extended by cetus.hir.ProcedureDeclarator
All Implemented Interfaces:
Printable, Symbol, Traversable, java.lang.Cloneable

public class ProcedureDeclarator
extends Declarator
implements Symbol

Represents a declarator for a Procedure in a VariableDeclaration.


Field Summary
 
Fields inherited from class cetus.hir.Declarator
children, leading_specs, object_print_method, parent, trailing_specs
 
Constructor Summary
ProcedureDeclarator(IDExpression direct_decl, java.util.List params)
           
ProcedureDeclarator(IDExpression direct_decl, java.util.List params, java.util.List trailing_specs)
           
ProcedureDeclarator(java.util.List leading_specs, IDExpression direct_decl, java.util.List params)
           
ProcedureDeclarator(java.util.List leading_specs, IDExpression direct_decl, java.util.List params, java.util.List trailing_specs, ExceptionSpecification espec)
           
 
Method Summary
 void addParameter(Declaration decl)
           
 void addParameterAfter(Declaration ref, Declaration decl)
           
 void addParameterBefore(Declaration ref, Declaration decl)
           
 java.lang.Object clone()
           
static void defaultPrint(ProcedureDeclarator dec, java.io.OutputStream stream)
          Prints a procedure declarator to a stream.
 java.util.List getArraySpecifiers()
          Returns a List of ArraySpecifier
 IDExpression getDirectDeclarator()
           
 java.util.List<Declaration> getParameters()
          Returns a List of Function Parameter
 IDExpression getSymbol()
          Returns the symbol declared by this declarator.
 java.lang.String getSymbolName()
          Returns the name of the symbol.
 java.util.List getTypeSpecifiers()
          Returns a list of type specifiers.
static void setClassPrintMethod(java.lang.reflect.Method m)
          Overrides the class print method, so that all subsequently created objects will use the supplied method.
 java.lang.String toString()
           
 
Methods inherited from class cetus.hir.Declarator
addTrailingSpecifier, defaultPrint, getChildren, getInitializer, getParent, getSpecifiers, print, removeChild, setChild, setInitializer, setParent
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProcedureDeclarator

public ProcedureDeclarator(IDExpression direct_decl,
                           java.util.List params)

ProcedureDeclarator

public ProcedureDeclarator(IDExpression direct_decl,
                           java.util.List params,
                           java.util.List trailing_specs)

ProcedureDeclarator

public ProcedureDeclarator(java.util.List leading_specs,
                           IDExpression direct_decl,
                           java.util.List params)

ProcedureDeclarator

public ProcedureDeclarator(java.util.List leading_specs,
                           IDExpression direct_decl,
                           java.util.List params,
                           java.util.List trailing_specs,
                           ExceptionSpecification espec)
Method Detail

addParameter

public void addParameter(Declaration decl)
Overrides:
addParameter in class Declarator

addParameterBefore

public void addParameterBefore(Declaration ref,
                               Declaration decl)
Overrides:
addParameterBefore in class Declarator

addParameterAfter

public void addParameterAfter(Declaration ref,
                              Declaration decl)
Overrides:
addParameterAfter in class Declarator

clone

public java.lang.Object clone()
Overrides:
clone in class Declarator

defaultPrint

public static void defaultPrint(ProcedureDeclarator dec,
                                java.io.OutputStream stream)
Prints a procedure declarator to a stream.

Parameters:
dec - The declarator to print.
stream - The stream on which to print the declarator.

toString

public java.lang.String toString()
Overrides:
toString in class Declarator

getDirectDeclarator

public IDExpression getDirectDeclarator()

getParameters

public java.util.List<Declaration> getParameters()
Description copied from class: Declarator
Returns a List of Function Parameter

Overrides:
getParameters in class Declarator
Returns:
List null is returned when there is no Function Parameter in the Declarator

getSymbol

public IDExpression getSymbol()
Returns the symbol declared by this declarator.

Overrides:
getSymbol in class Declarator

setClassPrintMethod

public static void setClassPrintMethod(java.lang.reflect.Method m)
Overrides the class print method, so that all subsequently created objects will use the supplied method.

Parameters:
m - The new print method.

getSymbolName

public java.lang.String getSymbolName()
Description copied from interface: Symbol
Returns the name of the symbol.

Specified by:
getSymbolName in interface Symbol
Returns:
the name of the symbol.

getTypeSpecifiers

public java.util.List getTypeSpecifiers()
Description copied from interface: Symbol
Returns a list of type specifiers.

Specified by:
getTypeSpecifiers in interface Symbol
Returns:
the list of type specifiers.

getArraySpecifiers

public java.util.List getArraySpecifiers()
Description copied from class: Declarator
Returns a List of ArraySpecifier

Specified by:
getArraySpecifiers in interface Symbol
Overrides:
getArraySpecifiers in class Declarator
Returns:
An empty list if there is no ArraySpecifier for this Declarator.