xtc.type
Class RelativeReference

java.lang.Object
  extended by xtc.type.Reference
      extended by xtc.type.RelativeReference
Direct Known Subclasses:
CastReference, FieldReference, IndexReference, IndirectReference

public abstract class RelativeReference
extends Reference

Representation of a reference value. A reference has a base, type, and an optional offset. The offset, in turn, either is an index or a field.

Version:
$Revision: 1.2 $
Author:
Robert Grimm

Field Summary
protected  Reference base
          The base.
 
Fields inherited from class xtc.type.Reference
type
 
Constructor Summary
RelativeReference(Type type, Reference base)
          Create a new relative reference.
 
Method Summary
 Reference getBase()
          Get this reference's base.
 boolean hasBase()
          Determine whether this reference has a base.
 boolean isConstant()
          Determine whether this reference represents a compile-time constant memory location.
 
Methods inherited from class xtc.type.Reference
add, add, difference, getField, getIndex, getLocation, getType, hasField, hasIndex, hasLocation, indirect, isCast, isDynamic, isIndirect, isNull, isPrefix, isStatic, isString, isVariable, subtract, subtract, toString, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

base

protected Reference base
The base.

Constructor Detail

RelativeReference

public RelativeReference(Type type,
                         Reference base)
Create a new relative reference.

Parameters:
type - The type.
base - The base.
Method Detail

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.

hasBase

public boolean hasBase()
Description copied from class: Reference
Determine whether this reference has a base.

Overrides:
hasBase in class Reference
Returns:
true if this reference has a base.
See Also:
RelativeReference

getBase

public Reference getBase()
Description copied from class: Reference
Get this reference's base.

Overrides:
getBase in class Reference
Returns:
The base.
See Also:
RelativeReference


Copyright © 2012. All Rights Reserved.