com.cmpware.elf
Class Scope

java.lang.Object
  extended by com.cmpware.elf.Scope
All Implemented Interfaces:
TreeViewable

public class Scope
extends java.lang.Object
implements TreeViewable

This class stores all the data necessary for a DWARF2 scope. This just makes for a simpler structure to use in places like a tree display.

Copyright (c) 2005 Cmpware, Inc. All Rights Reserved.

Author:
SAG

Field Summary
static java.lang.String copyright
          Copyright string
 int declFile
          The declaration file number
 int declLine
          The declaration line number
 int endAddr
          The scope end address
 LocationList frameBase
          The location list
 java.lang.String name
          The Scope name
 Scope parent
          The parent scope (null for top level)
 int startAddr
          The scope start address
 java.util.Vector subscope
          Sub-scopes under this scope (type = scope)
 java.util.Vector variable
          Variables under this scope (type = Variable)
 
Constructor Summary
Scope(Scope parent)
          This constructor takes the parent scope as its parameter.
 
Method Summary
 java.lang.Object[] getChildren()
          This method returns the children of this object.
 org.eclipse.swt.graphics.Image getImage()
          This method returns an image used as a decorator.
 java.lang.Object getParent()
          This method returns the parent of this object.
static Scope getScope(Dwarf2 dwarf2, Scope parent, Tag tag)
          This method returns a scope class from a DWARF2 Tag.
 java.lang.String getText()
          This method returns the text string associated with this object.
 boolean hasChildren()
          This method returns true if this object has children and false otherwise.
 java.lang.String toString(int addrBytes, boolean byteSwap)
          This method returns a string representation of the DWARF tag data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final java.lang.String copyright
Copyright string

See Also:
Constant Field Values

name

public java.lang.String name
The Scope name


startAddr

public int startAddr
The scope start address


endAddr

public int endAddr
The scope end address


declLine

public int declLine
The declaration line number


declFile

public int declFile
The declaration file number


subscope

public java.util.Vector subscope
Sub-scopes under this scope (type = scope)


variable

public java.util.Vector variable
Variables under this scope (type = Variable)


parent

public Scope parent
The parent scope (null for top level)


frameBase

public LocationList frameBase
The location list

Constructor Detail

Scope

public Scope(Scope parent)
This constructor takes the parent scope as its parameter.

Parameters:
parent - The parent scope.
Method Detail

getScope

public static Scope getScope(Dwarf2 dwarf2,
                             Scope parent,
                             Tag tag)
This method returns a scope class from a DWARF2 Tag.

Parameters:
dwarf2 - The DWARF2 object.
parent - The parent scope.
tag - the DWARF2 tag.
Returns:
This method returns a scope class from a DWARF2 Tag.

getChildren

public java.lang.Object[] getChildren()
Description copied from interface: TreeViewable
This method returns the children of this object.

Specified by:
getChildren in interface TreeViewable
Returns:
This method returns the children of this object

getParent

public java.lang.Object getParent()
Description copied from interface: TreeViewable
This method returns the parent of this object.

Specified by:
getParent in interface TreeViewable
Returns:
This method returns the parent of this object.

hasChildren

public boolean hasChildren()
Description copied from interface: TreeViewable
This method returns true if this object has children and false otherwise.

Specified by:
hasChildren in interface TreeViewable
Returns:
This method returns true if this object has children and false otherwise.

getText

public java.lang.String getText()
Description copied from interface: TreeViewable
This method returns the text string associated with this object.

Specified by:
getText in interface TreeViewable
Returns:
This method returns the text string associated with this object.

getImage

public org.eclipse.swt.graphics.Image getImage()
Description copied from interface: TreeViewable
This method returns an image used as a decorator.

Specified by:
getImage in interface TreeViewable
Returns:
This method returns an image used as a decorator.

toString

public java.lang.String toString(int addrBytes,
                                 boolean byteSwap)
This method returns a string representation of the DWARF tag data.

Parameters:
addrBytes - the number of bytes in an address.
byteSwap - the byte swappting flag from the ELF file.
Returns:
This method returns a string representation of the DWARF tag data.