frysk.scopes
Class Scope

java.lang.Object
  extended by frysk.scopes.Scope
Direct Known Subclasses:
Composite, LexicalBlock, NamedScope

public class Scope
extends Object

A class to represent a Scope. Here are the scopes described by Dwarf debug info: compile_unit module lexical_block with_stmt (pascal Modula2) catch_block try_block entry_point inlined_subroutine subprogram namespace imported_unit The most important property of a scope is that it can own variables and this object will give you access to them.


Constructor Summary
Scope(DwarfDie die, TypeFactory typeFactory)
           
 
Method Summary
 ObjectDeclaration getDeclaredObjectByName(String name)
           
 ObjectDeclaration getDeclaredObjectByNameRecursive(String name)
          Searches child scopes for the given name
 LinkedList getEnums()
           
 Scope getInner()
           
 LinkedList getObjectDeclarations()
          Searches for variables, scopes, and object declarations Variables are variable tags scopes are scope tags objectDeclarations are either variables or NamedScopes
 Scope getOuter()
           
 LinkedList getScopes()
           
 SourceLocation getSourceLocation()
           
 LinkedList getVariables()
           
static boolean isScopeDie(DwarfDie die)
           
 void setOuter(Scope outer)
           
 void toPrint(DebugInfoFrame frame, PrintWriter writer, String indentString)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scope

public Scope(DwarfDie die,
             TypeFactory typeFactory)
Method Detail

getOuter

public Scope getOuter()

getInner

public Scope getInner()

setOuter

public void setOuter(Scope outer)

getScopes

public LinkedList getScopes()

getVariables

public LinkedList getVariables()

getObjectDeclarations

public LinkedList getObjectDeclarations()
Searches for variables, scopes, and object declarations Variables are variable tags scopes are scope tags objectDeclarations are either variables or NamedScopes

Returns:

getSourceLocation

public SourceLocation getSourceLocation()

getEnums

public LinkedList getEnums()

isScopeDie

public static boolean isScopeDie(DwarfDie die)

getDeclaredObjectByName

public ObjectDeclaration getDeclaredObjectByName(String name)

getDeclaredObjectByNameRecursive

public ObjectDeclaration getDeclaredObjectByNameRecursive(String name)
Searches child scopes for the given name

Parameters:
name -
Returns:

toPrint

public void toPrint(DebugInfoFrame frame,
                    PrintWriter writer,
                    String indentString)