com.cmpware.elf
Class VariableType

java.lang.Object
  extended by com.cmpware.elf.VariableType
All Implemented Interfaces:
TreeViewable
Direct Known Subclasses:
ArrayType, MemberType, ScalarType, StructType

public abstract class VariableType
extends java.lang.Object
implements TreeViewable

This class stores all the data necessary for a DWARF variable type. 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
 int addrOffset
          The address offset (for structs and arrays)
 int byteSize
          The size (in bytes)
static int CONST
          The variable type is constant
static java.lang.String[] modifierName
          The names of the modifiers
 java.util.Vector modifiers
          The variable type modifier (NONE, CONST, VOLATILE or POINTER)
 java.lang.String name
          The variable name
static int NONE
          No modifier
 VariableType parent
          The parent VariableType
static int POINTER
          The variable type is a pointer
 Variable variable
          The parent Variable
static int VOLATILE
          The variable type is volatile
 
Constructor Summary
VariableType()
           
 
Method Summary
 java.lang.String getName()
           
static VariableType getVariableType(VariableType parent, Variable variable, Tag tag)
          This method parses the DWARF2 type data associated with a variable and returns the appropriate data structures.
 java.lang.String toString(boolean byteSwap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.cmpware.elf.TreeViewable
getChildren, getImage, getParent, getText, hasChildren
 

Field Detail

name

public java.lang.String name
The variable name


modifiers

public java.util.Vector modifiers
The variable type modifier (NONE, CONST, VOLATILE or POINTER)


parent

public VariableType parent
The parent VariableType


variable

public Variable variable
The parent Variable


addrOffset

public int addrOffset
The address offset (for structs and arrays)


byteSize

public int byteSize
The size (in bytes)


NONE

public static final int NONE
No modifier

See Also:
Constant Field Values

CONST

public static final int CONST
The variable type is constant

See Also:
Constant Field Values

VOLATILE

public static final int VOLATILE
The variable type is volatile

See Also:
Constant Field Values

POINTER

public static final int POINTER
The variable type is a pointer

See Also:
Constant Field Values

modifierName

public static final java.lang.String[] modifierName
The names of the modifiers

Constructor Detail

VariableType

public VariableType()
Method Detail

getVariableType

public static VariableType getVariableType(VariableType parent,
                                           Variable variable,
                                           Tag tag)
This method parses the DWARF2 type data associated with a variable and returns the appropriate data structures.

Parameters:
parent - The parent variabel type.
variable - The DWARF2 variable.
tag - The starting tag that defines this type.
Returns:
This method returns the variable type data structures associated with this variable.

toString

public java.lang.String toString(boolean byteSwap)

getName

public java.lang.String getName()