ESC/Java2
© 2003,2004,2005 David Cok and Joseph Kiniry
© 2005 UCD Dublin
© 2003,2004 Radboud University Nijmegen
© 1999,2000 Compaq Computer Corporation
© 1997,1998,1999 Digital Equipment Corporation
All Rights Reserved

javafe.ast
Class GenericVarDecl

java.lang.Object
  extended byjavafe.ast.ASTNode
      extended byjavafe.ast.GenericVarDecl
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
FieldDecl, FormalParaDecl, LocalVarDecl

public abstract class GenericVarDecl
extends ASTNode

Represents all variable declarations, including field declarations, local variables and formal arguments. We 'unroll' field and variable decls, so "int x,y;" becomes "int x; int y;". This unrolling can be detected by looking for sequential VarDecls whose Type fields have the same starting location.


Field Summary
 Identifier id
           
 int locId
           
 int modifiers
           
 ModifierPragmaVec pmodifiers
           
 Type type
           
 
Fields inherited from class javafe.ast.ASTNode
decorations
 
Constructor Summary
protected GenericVarDecl()
          Construct a raw GenericVarDecl whose class invariant(s) have not yet been established.
 
Method Summary
 void check()
           
 int getEndLoc()
           
 int getModifiers()
           
 int getStartLoc()
           
 void setModifiers(int m)
           
 
Methods inherited from class javafe.ast.ASTNode
accept, accept, childAt, childCount, clone, clone, getDecorations, getTag, setDecorations, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

modifiers

public int modifiers

pmodifiers

public ModifierPragmaVec pmodifiers

id

public Identifier id

type

public Type type

locId

public int locId
Constructor Detail

GenericVarDecl

protected GenericVarDecl()
Construct a raw GenericVarDecl whose class invariant(s) have not yet been established. It is the caller's job to initialize the returned node's fields so that any class invariants hold.

Method Detail

getStartLoc

public int getStartLoc()
Specified by:
getStartLoc in class ASTNode

getEndLoc

public int getEndLoc()
Overrides:
getEndLoc in class ASTNode

getModifiers

public int getModifiers()

setModifiers

public void setModifiers(int m)

check

public void check()
Overrides:
check in class ASTNode

ESC/Java2
© 2003,2004,2005 David Cok and Joseph Kiniry
© 2005 UCD Dublin
© 2003,2004 Radboud University Nijmegen
© 1999,2000 Compaq Computer Corporation
© 1997,1998,1999 Digital Equipment Corporation
All Rights Reserved

The ESC/Java2 Project Homepage