AST
node type ClassDecl

General Info

Production
ClassDecl : TypeDecl ::= [Superclass:IdUse] Body:Block;
Type Hierarchy:
java.lang.Object
  extended by AST.ASTNode<ASTNode>
      extended by AST.BlockStmt
          extended by AST.Decl
              extended by AST.TypeDecl
                  extended by AST.ClassDecl
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<ASTNode>

Description

Source
Declared in ../spec/picojava.ast at line 8

Member Filters

API level:

Aspect:

Constructors

public ClassDecl()
public ClassDecl(java.lang.String p0,
                 Opt<IdUse> p1,
                 Block p2)

Attributes

syn Decl remoteLookup(java.lang.String name)
Overrides:remoteLookup in class TypeDecl
Source
Declared in ../spec/NameResolution.jrag at line 62
Aspect
NameResolution
syn boolean isSubtypeOf(TypeDecl typeDecl)
Overrides:isSubtypeOf in class TypeDecl
Source
Declared in ../spec/TypeAnalysis.jrag at line 44
Aspect
TypeAnalysis
Source
Declared in ../spec/TypeAnalysis.jrag at line 51
Aspect
TypeAnalysis
Source
Declared in ../spec/TypeAnalysis.jrag at line 59
Aspect
TypeAnalysis
syn Decl remoteLookupMethod(java.lang.String name,
                        List argList)
Overrides:remoteLookupMethod in class TypeDecl
Source
Declared in spec/NameResolution.jrag at line 43
Aspect
NameResolution
inh Decl lookupMethod(java.lang.String name,
                  List argList)
Source
Declared in spec/NameResolution.jrag at line 8
Aspect
NameResolution

Methods

public ClassDecl clone()
                throws java.lang.CloneNotSupportedException
Overrides:clone in class TypeDecl
Throws:
java.lang.CloneNotSupportedException
public ClassDecl copy()
Overrides:copy in class ASTNode<ASTNode>
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
Overrides:fullCopy in class ASTNode<ASTNode>
Returns:
dangling copy of the subtree at this node
public void collectErrors(java.util.Collection c)
Overrides:collectErrors in class ASTNode<ASTNode>
Source
Declared in ../spec/ErrorCheck.jadd at line 32
Aspect
ErrorCheck
public void prettyPrint(java.lang.StringBuilder sb,
                        int t)
Source
Declared in ../spec/PrettyPrint.jadd at line 40
Aspect
PrettyPrint
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
Overrides:init$Children in class TypeDecl
protected int numChildren()
Overrides:numChildren in class TypeDecl
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class TypeDecl
public void flushCache()
Overrides:flushCache in class TypeDecl
public void flushCollectionCache()
Overrides:flushCollectionCache in class TypeDecl
public void setName(java.lang.String value)
Replaces the lexeme Name.
Overrides:setName in class TypeDecl
Parameters:
value - The new value for the lexeme Name.
public java.lang.String getName()
Retrieves the value for the lexeme Name.
Overrides:getName in class TypeDecl
Returns:
The value for the lexeme Name.
public void setSuperclassOpt(Opt<IdUse> opt)
Replaces the optional node for the Superclass child. This is the Opt node containing the child Superclass, not the actual child!
Parameters:
opt - The new node to be used as the optional node for the Superclass child.
public void setSuperclass(IdUse node)
Replaces the (optional) Superclass child.
Parameters:
node - The new node to be used as the Superclass child.
public boolean hasSuperclass()
Check whether the optional Superclass child exists.
Returns:
true if the optional Superclass child exists, false if it does not.
Retrieves the (optional) Superclass child.
Returns:
The Superclass child, if it exists. Returns null otherwise.
Retrieves the optional node for the Superclass child. This is the Opt node containing the child Superclass, not the actual child!
Returns:
The optional node for child the Superclass child.
Retrieves the optional node for child Superclass. This is the Opt node containing the child Superclass, not the actual child!

This method does not invoke AST transformations.

Returns:
The optional node for child Superclass.
public void setBody(Block node)
Replaces the Body child.
Parameters:
node - The new node to replace the Body child.
public Block getBody()
Retrieves the Body child.
Returns:
The current node used as the Body child.
Retrieves the Body child.

This method does not invoke AST transformations.

Returns:
The current node used as the Body child.
public Decl Define_Decl_lookup(ASTNode caller,
                               ASTNode child,
                               java.lang.String name)
Overrides:Define_Decl_lookup in class ASTNode<ASTNode>
Source
Declared in ../spec/NameResolution.jrag at line 31
public Decl Define_Decl_lookupMethod(ASTNode caller,
                                     ASTNode child,
                                     java.lang.String name,
                                     List argList)
Overrides:Define_Decl_lookupMethod in class ASTNode<ASTNode>
Source
Declared in spec/NameResolution.jrag at line 16
Overrides:Define_ClassDecl_enclosingClassDecl in class ASTNode<ASTNode>
Source
Declared in spec/TypeAnalysis.jrag at line 9
Overrides:rewriteTo in class TypeDecl

Fields

protected java.util.Map remoteLookup_String_visited
protected java.util.Map isSubtypeOf_TypeDecl_visited
protected java.util.Map isSubtypeOf_TypeDecl_values
protected int superClass_visited
protected boolean superClass_computed
protected java.util.Map lookupMethod_String_List_visited

Inherited Members

Attributes inherited from AST.TypeDecl

Attributes inherited from AST.Decl

Attributes inherited from AST.BlockStmt

Methods inherited from class AST.ASTNode

Methods inherited from class java.lang.Object

equals
finalize
getClass
hashCode
notify
notifyAll
toString
wait
wait
wait

Fields inherited from AST.TypeDecl

Fields inherited from AST.Decl

Fields inherited from AST.BlockStmt

Fields inherited from AST.ASTNode