com.cmpware.elf
Class ScalarType

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

public class ScalarType
extends VariableType

This class stores all the data necessary for a DWARF Scalar variable type. This is the final entry in a type tree and is used to produce the final address and value of the variable.

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

Author:
SAG

Field Summary
 int addr
          The scalar address
 int baseType
          The base type encoding
static java.lang.String copyright
          Copyright string
 java.lang.String typeName
          The base type encoding
 long val
          The scalar value
 
Fields inherited from class com.cmpware.elf.VariableType
addrOffset, byteSize, CONST, modifierName, modifiers, name, NONE, parent, POINTER, variable, VOLATILE
 
Constructor Summary
ScalarType()
          Constructor
ScalarType(ScalarType st)
           
 
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 ScalarType getScalarType(VariableType parent, Variable variable, Tag typeTag)
          This method returns a Scalar Type with data filled in from the ELF /DWARF tag.
 java.lang.String getText()
          This method returns the text string associated with this object.
 void getValue()
          This method returns the value of the scalar type.
 boolean hasChildren()
          This method returns true if this object has children and false otherwise.
 java.lang.String toString(boolean byteSwap)
          This method returns a string representation of the variable type data.
 
Methods inherited from class com.cmpware.elf.VariableType
getName, getVariableType
 
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

typeName

public java.lang.String typeName
The base type encoding


baseType

public int baseType
The base type encoding


addr

public int addr
The scalar address


val

public long val
The scalar value

Constructor Detail

ScalarType

public ScalarType()
Constructor


ScalarType

public ScalarType(ScalarType st)
Method Detail

getScalarType

public static ScalarType getScalarType(VariableType parent,
                                       Variable variable,
                                       Tag typeTag)
This method returns a Scalar Type with data filled in from the ELF /DWARF tag. Note that this tag should be a DW_TAG_base_type.

Parameters:
parent - the variable parent.
variable - the variable.
typeTag - The ELF /DWARF tag type.
Returns:
This method returns a Scalar type with all of the fields filled in according to the input DWARF tag.

getValue

public void getValue()
This method returns the value of the scalar type. This is done by reading the proper address in the current processor. The local variables addr and val are set by this method.


getChildren

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

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.

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.

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.

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.

Returns:
This method returns an image used as a decorator.

toString

public java.lang.String toString(boolean byteSwap)
This method returns a string representation of the variable type data.

Overrides:
toString in class VariableType
Parameters:
byteSwap - the byte swappting flag from the ELF file.
Returns:
This method returns a string representation of the variable type data.