frysk.scopes
Class Scope
java.lang.Object
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.
Scope
public Scope(DwarfDie die,
TypeFactory typeFactory)
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)