jltools.ext.jl.ast
Class Declarator_c

java.lang.Object
  |
  +--jltools.ext.jl.ast.Declarator_c
All Implemented Interfaces:
java.lang.Cloneable, Copy, Declarator

public class Declarator_c
extends java.lang.Object
implements Declarator

Encapsulation of the details of a declaration of a variable (field or local).


Field Summary
protected  Flags flags
           
protected  Expr init
           
protected  java.lang.String name
           
protected  TypeNode type
           
 
Constructor Summary
Declarator_c(Flags flags, TypeNode type, java.lang.String name, Expr init)
           
 
Method Summary
 java.lang.Object copy()
          Get the copy of the declarator.
 Type declType()
          Get the type of the declarator.
 Flags flags()
          Get the flags of the declarator.
 Declarator flags(Flags flags)
          Set the flags of the declarator.
 Expr init()
          Get the initializer of the declarator.
 Declarator init(Expr init)
          Set the initializer of the declarator.
 java.lang.String name()
          Get the name of the declarator.
 Declarator name(java.lang.String name)
          Set the name of the declarator.
 java.lang.String toString()
           
 void translate(CodeWriter w, Translator tr, boolean field)
          Write the declarator to an output file.
 TypeNode type()
          Get the type node of the declarator.
 Declarator type(TypeNode type)
          Set the type node of the declarator.
 void typeCheck(TypeChecker tc)
          Type check the declarator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

flags

protected Flags flags

type

protected TypeNode type

name

protected java.lang.String name

init

protected Expr init
Constructor Detail

Declarator_c

public Declarator_c(Flags flags,
                    TypeNode type,
                    java.lang.String name,
                    Expr init)
Method Detail

copy

public java.lang.Object copy()
Get the copy of the declarator.
Specified by:
copy in interface Copy

flags

public Flags flags()
Get the flags of the declarator.
Specified by:
flags in interface Declarator

flags

public Declarator flags(Flags flags)
Description copied from interface: Declarator
Set the flags of the declarator.
Specified by:
flags in interface Declarator

declType

public Type declType()
Get the type of the declarator.
Specified by:
declType in interface Declarator

type

public TypeNode type()
Get the type node of the declarator.
Specified by:
type in interface Declarator

type

public Declarator type(TypeNode type)
Set the type node of the declarator.
Specified by:
type in interface Declarator

name

public java.lang.String name()
Get the name of the declarator.
Specified by:
name in interface Declarator

name

public Declarator name(java.lang.String name)
Set the name of the declarator.
Specified by:
name in interface Declarator

init

public Expr init()
Get the initializer of the declarator.
Specified by:
init in interface Declarator

init

public Declarator init(Expr init)
Set the initializer of the declarator.
Specified by:
init in interface Declarator

typeCheck

public void typeCheck(TypeChecker tc)
               throws SemanticException
Type check the declarator.
Specified by:
typeCheck in interface Declarator

toString

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

translate

public void translate(CodeWriter w,
                      Translator tr,
                      boolean field)
Write the declarator to an output file.
Specified by:
translate in interface Declarator