xtc.type
Class NullReference

java.lang.Object
  extended by xtc.type.Reference
      extended by xtc.type.NullReference

public class NullReference
extends Reference

Representation of a null reference. A null reference represents the null location in memory. Its type is void; it neither has a base nor an offset.

Version:
$Revision: 1.4 $
Author:
Robert Grimm

Field Summary
static NullReference NULL
          The canonical null reference.
 
Fields inherited from class xtc.type.Reference
type
 
Method Summary
 java.math.BigInteger getLocation(C ops)
          Get this reference's absolute memory location.
 boolean hasLocation()
          Determine whether this reference has an absolute memory location.
 boolean isConstant()
          Determine whether this reference represents a compile-time constant memory location.
 boolean isNull()
          Determine whether this reference is a null 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, getType, hasBase, hasField, hasIndex, indirect, isCast, isDynamic, isIndirect, isPrefix, isStatic, isString, isVariable, subtract, subtract, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL

public static final NullReference NULL
The canonical null reference.

Method Detail

isNull

public boolean isNull()
Description copied from class: Reference
Determine whether this reference is a null reference. Note that a reference other than NULL may still return true; notably, an index reference with a null base and a zero offset still is null.

Overrides:
isNull in class Reference
Returns:
true if this reference is a null reference.
See Also:
NullReference

hasLocation

public boolean hasLocation()
Description copied from class: Reference
Determine whether this reference has an absolute memory location.

Overrides:
hasLocation in class Reference
Returns:
true if this reference has an absolute memory location.

getLocation

public java.math.BigInteger getLocation(C ops)
Description copied from class: Reference
Get this reference's absolute memory location.

Overrides:
getLocation in class Reference
Parameters:
ops - The C operations.
Returns:
The memory location.

isConstant

public boolean isConstant()
Description copied from class: Reference
Determine whether this reference represents a compile-time constant memory location.

Overrides:
isConstant in class Reference
Returns:
true if this reference represents a compile-time memory location.

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.