All Packages Class Hierarchy This Package Previous Next Index
Class com.arcsinc.hardwarehost.coff.ExtVariableSpec
java.lang.Object
|
+----com.arcsinc.hardwarehost.coff.ExtVariableSpec
- public class ExtVariableSpec
- extends Object
- implements Serializable, Cloneable
The ExtVariableSpec
class provides a description of
symbols within a COFF file. All symbols have a name and a module.
For example, if the following line appears in the source file
foo.c
:
int bar;
the symbol name is _bar
and the module name is
either foo.c
or foo.asm
(the particular
name depends on compilation options; within AIDE, it will be
xxx.c
).
This class also contains typing and location information for the symbol.
- he symbol.
- See Also:
- SymbolParams
-
ExtVariableSpec()
-
-
ExtVariableSpec(ExtVariableSpec)
- This is the copy constructor.
-
ExtVariableSpec(String, String, byte, byte)
- This is a constructor with the value and offset unknown or not
applicable.
-
ExtVariableSpec(String, String, byte, byte, Number)
- This is a constructor with the offset unknown or not applicable.
-
ExtVariableSpec(String, String, byte, byte, Number, int)
- This is a constructor.
-
clone()
- This function supports the
Cloneable
interface
-
getAddress()
- Get the value of address.
-
getBasicType()
- Get the value of basicTyp the value of basicType.
-
getBasicType(Vector, String, String)
- This is a static accessor method which accepts a
Vector
of ExtVariableSpec
, the symbol's
name and module.
-
getDerivedType()
- Get the value of derivedType.
-
getDerivedType(Vector, String, String)
- This is a static accessor method which accepts a
Vector
of ExtVariableSpec
, the symbol's
name and module.
-
getIndex(Vector, String, String)
- This is a static accessor method which accepts a
Vector
of ExtVariableSpec
, the symbol's
name
and module
.
-
getModule()
- Get the value of module.
-
ght=6 alt=" o ">
getName()
- Get the value of name.
-
getOffset()
- Get the value of offset.
-
getValue()
- Get the value of value.
-
isBasicType(Vector, String, String)
- This is a static accessor method which accepts a
Vector
of ExtVariableSpec
, the symbol's
name and module.
-
isSymbolArray()
- Determines whether or not this symbol is of array
(
DT_ARY
) type.
-
isSymbolPointer()
- Determines whether or not this symbol is of pointer
(
DT_PTR
) type.
-
setAddress(int)
- Set the value of address.
-
setBasicTypeb>setBasicType(byte)
- Set the value of basicType.
-
setDerivedType(byte)
- Set the value of derivedType.
-
setOffset(int)
- Set the value of offset.
-
setValue(Number)
- Set the value of value.
ExtVariableSpec
public ExtVariableSpec()
ExtVariableSpec
public ExtVariableSpec(ExtVariableSpec a)
- This is the copy constructor.
- Parameters:
- a - the
ExtVariableSpec
to copy.
ExtVariableSpec
=" o ">
ExtVariableSpec
public ExtVariableSpec(String name,
String module,
byte basicType,
byte derivedType)
- This is a constructor with the value and offset unknown or not
applicable.
- Parameteb>Parameters:
- name - the symbol name.
- module - the symbol module.
- basicType - the symbol basicType, e.g. T_INT
- derivedType - the symbol derivedType, e.g. DT_NON
ExtVariableSpec
public ExtVariableSpec(String name,
String module,
byte basicType,
byte derivedType,
Number value)
- This is a constructor with the offset unknown or not applicable.
- Parameters:
- name - the symbol name.
- module - the symbol module.
- basicType - the symbol basicType, e.g. T_INT
- derivedType - the symbol derivedType, e.g. DT_NON
- value - the current value of the symbol in the
application
ExtVariableSpec
public ExtVariableSpec(String name,
String module,
byte basicType,
byte derivedType,
Number value,
int offset)
- This is a constructor.
- Parameters:
- name - the symbol name.
- module - the symbol module.
- basicType - the symbol basicType, e.g. T_INT
- derivedType - the symbol derivedType, e.g. DT_ARY
- value - the current value of the symbol in the
application
- offset - the offset for the symbol, int a[5]; a[3],
offset is 3
isBasicType
public static boolean isBasicType(Vector vec,
String name,
String module)
- This is a static accessor method which accepts a
Vector
of ExtVariableSpec
, the symbol's
name and module. It returns true
if the symbol is
DT_NON
type. For example, the corresponding
symbol entry for "int foo;
" returns true; however,
int* bar;
returns false.
- Parameters:
- vec - a Vector of ExtVariableSpec
- name - the symbol name (standard notation prepends "_"
to the name.
- module - the module name in which the symbol is defined.
- Returns:
- a boolean, true if the symbol is a basic type.
getBasicType
public static byte getBasicType(Vector vec,
String name,
String module)
- This is a static accessor method which accepts a
Vector
of ExtVariabl
of ExtVariableSpec
, the symbol's
name and module. It returns the basic type for the symbol
(void, int, float, etc.).
- Parameters:
- vec - a Vector of ExtVariableSpec
- name - the symbol name (standard notation prepends "_"
to the name.
- module - the module name in which the symbol is defined.
- Returns:
- a byte representing the basic type as defined in
SymbolParams
getDerivedType
public static int getDerivedType(Vector vec,
String name,
String module)
- This is a static accessor method which accepts a
Vector
of ExtVariableSpec
, the symbol's
name and module. It returns the derived type for the symbol
(none, pointer, array, or function).
- Parameters:
- vec - a Vector of ExtVariableSpec
- name - the symbol name (standard notation prepends "_"
to the name.
- module - the module name in which the symbol is defined.
- Returns:
- a byte representing the derived type as defined in
SymbolParams
getIndex
public static int getIndex(Vector vec,
String name,
String module)
- This is a static accessor method which accepts a
Vector
of ExtVariableSpec
, the symbol's
name
and module
. It returns the index for the
symbol in the Vector
.
- Parameters:
- Parameters:
- vec - a Vector of ExtVariableSpec
- name - the symbol name (standard notation prepends "_"
to the name.
- module - the module name in which the symbol is defined.
- Returns:
- an integer with the index into the
Vector
,
-1 if the symbol is not found.
clone
public Object clone()
- This function supports the
Cloneable
interface
p>
- Returns:
- an Object which is cloned.
- Overrides:
- clone in class Object
getAddress
public int getAddress()
- Get the value of address.
- Returns:
- Value of address.
setAddress
public void setAddress(int v)
- Set the value of address.
- Parameters:
- v - Value to assign to address.
getOffset
public int getOffset()
- Get the value of offset.
- Returns:
- Value of offset.
setOffset
public void setOffset(int v)
- Set the value of offset.
- Parameters:
- v - Value to assign to offset.
getName
public String getName()
- Get the value of name.
- Returns:
- Value of name.
getModule
public String getModule()
- Get the value of module.
- Returns:
- Value of module.
getBasicType
public byte getBasicType()
- Get the value of basicType.
- Returns:
- Value of basicType.
setBasicType
public void setBasicType(byte v)
- Set the value of basicType.
- Parameters:
- v - Value to assign to basicType.
getDerivedType
public byte getDerivedType()
- Get the value of derivedType.
- Returns:
- Value of derivedType.
setDerivedType
public void setDerivedType(byte v)
- Set the value of derivedType.
- Parameters:
- v - Value to assign to derivedType.
h=12 height=12 alt=" o ">
getValue
public Number getValue()
- Get the value of value.
- Returns:
- Value of value.
setValue
public void setValue(Number v)
- Set the value of value.
- Parameters:
- v - Value to assign to value.
isSymbolArray
public boolean isSymbolArray()
- Determines whether or not this symbol is of array
(
DT_ARY
) type.
- Returns:
- true if symbol is of array type
isSymbolPointer
public boolean isSymbolPointer()
- Determines whether or not this symbol is of pointer
(
DT_PTR
) type.
- Returns:
- true if symbol is of array type
All Packages Class Hierarchy This Package Previous Next Index