xtc.type
Class VariableReference

java.lang.Object
  extended by xtc.type.Reference
      extended by xtc.type.VariableReference
Direct Known Subclasses:
DynamicReference, StaticReference

public abstract class VariableReference
extends Reference

Representation of a symbolic memory location. A variable reference has neither a base nor an offset.

Version:
$Revision: 1.4 $
Author:
Robert Grimm

Field Summary
 
Fields inherited from class xtc.type.Reference
type
 
Constructor Summary
VariableReference(java.lang.String name, Type type)
          Create a new variable reference.
VariableReference(Type type)
          Create a new anonymous variable reference.
 
Method Summary
 java.lang.String getName()
          Get this static reference's name.
 boolean hasName()
          Determine whether this variable reference has a name.
 boolean isVariable()
          Determine whether this reference is a variable reference.
 void write(java.lang.Appendable out)
          Write a human readable representation to the specified appendable.
 
Methods inherited from class xtc.type.Reference
add, add, difference, getBase, getField, getIndex, getLocation, getType, hasBase, hasField, hasIndex, hasLocation, indirect, isCast, isConstant, isDynamic, isIndirect, isNull, isPrefix, isStatic, isString, subtract, subtract, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VariableReference

public VariableReference(Type type)
Create a new anonymous variable reference.

Parameters:
type - The declared type.

VariableReference

public VariableReference(java.lang.String name,
                         Type type)
Create a new variable reference.

Parameters:
name - The declared name.
type - The declared type.
Method Detail

isVariable

public boolean isVariable()
Description copied from class: Reference
Determine whether this reference is a variable reference.

Overrides:
isVariable in class Reference
Returns:
true if this reference is a variable reference.
See Also:
VariableReference

hasName

public boolean hasName()
Determine whether this variable reference has a name.

Returns:
true if this variable reference has a name.

getName

public java.lang.String getName()
Get this static reference's name.

Returns:
The name.

write

public void write(java.lang.Appendable out)
           throws java.io.IOException
Description copied from class: Reference
Write a human readable representation to the specified appendable.

Specified by:
write in class Reference
Parameters:
out - The appendable.
Throws:
java.io.IOException - Signals an I/O error.


Copyright © 2012. All Rights Reserved.