xtc.type
Class CastReference

java.lang.Object
  extended by xtc.type.Reference
      extended by xtc.type.RelativeReference
          extended by xtc.type.CastReference

public class CastReference
extends RelativeReference

Representation of a cast reference.

Version:
$Revision: 1.4 $
Author:
Robert Grimm

Field Summary
 
Fields inherited from class xtc.type.RelativeReference
base
 
Fields inherited from class xtc.type.Reference
type
 
Constructor Summary
CastReference(Type type, Reference base)
          Create a new cast reference.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.math.BigInteger getLocation(C ops)
          Get this reference's absolute memory location.
 int hashCode()
           
 boolean hasLocation()
          Determine whether this reference has an absolute memory location.
 boolean isCast()
          Determine whether this reference is a cast reference.
 boolean isPrefix()
          Determine whether this reference represents a prefix operator in C syntax.
 void write(java.lang.Appendable out)
          Write a human readable representation to the specified appendable.
 
Methods inherited from class xtc.type.RelativeReference
getBase, hasBase, isConstant
 
Methods inherited from class xtc.type.Reference
add, add, difference, getField, getIndex, getType, hasField, hasIndex, indirect, isDynamic, isIndirect, isNull, isStatic, isString, isVariable, subtract, subtract, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CastReference

public CastReference(Type type,
                     Reference base)
Create a new cast reference.

Parameters:
base - The base reference.
type - The cast-to type.
Method Detail

isPrefix

public boolean isPrefix()
Description copied from class: Reference
Determine whether this reference represents a prefix operator in C syntax.

Overrides:
isPrefix in class Reference
Returns:
true if this reference represents a prefix operator.

isCast

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

Overrides:
isCast in class Reference
Returns:
true if this reference is a cast reference.

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.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

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.