Business Objects
Quark Platform Documentation
Version 1.7.0_0
Business Objects

org.openquark.cal.runtime
Class CalValue

java.lang.Object
  extended by org.openquark.cal.runtime.CalValue

public abstract class CalValue
extends Object

This is the base class used by CAL for values.

Author:
RCypher

Nested Class Summary
static class CalValue.DataType
          An enumeration for the underlying value type of an internal value.
 
Constructor Summary
CalValue()
           
 
Method Summary
abstract  CalValue debug_getChild(int childN)
          Warning: for debugging use only.
abstract  String debug_getChildPrefixText(int childN)
          Warning: for debugging use only.
abstract  MachineType debug_getMachineType()
           
abstract  int debug_getNChildren()
          Warning: for debugging use only.
abstract  String debug_getNodeEndText()
          Warning: for debugging use only.
abstract  String debug_getNodeStartText()
          Warning: for debugging use only.
abstract  boolean debug_isIndirectionNode()
          Warning: for debugging use only.
 boolean equals(Object other)
          
abstract  CalValue.DataType getDataType()
          Returns the type of the underlying value associated with this CalValue.
 int hashCode()
          
abstract  CalValue internalUnwrapOpaque()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CalValue

public CalValue()
Method Detail

debug_getNChildren

public abstract int debug_getNChildren()
Warning: for debugging use only. Implementations must not modify this CalValue in any way. debug_getNChildren and debug_getChild provide an abstract way for traversing the value graph. See the implementation of DebugSupport.javaStackShowInternal to see the contract that implementers of this method must adhere to.

Returns:
the number of children of this node.

debug_getChild

public abstract CalValue debug_getChild(int childN)
Warning: for debugging use only. Implementations must not modify this CalValue in any way. debug_getNChildren and debug_getChild provide an abstract way for traversing the value graph. See the implementation of DebugSupport.javaStackShowInternal to see the contract that implementers of this method must adhere to.

Parameters:
childN - the zero-based child number
Returns:
the child at the specified childN index. It is possible for this to be null when attempting to view an CalValue that is in the proces of being reduced.

debug_getNodeStartText

public abstract String debug_getNodeStartText()
Warning: for debugging use only. Implementations must not modify this CalValue in any way. See the implementation of DebugSupport.javaStackShowInternal to see the contract that implementers of this method must adhere to.

Returns:
the start string for this node. Cannot be null.

debug_getNodeEndText

public abstract String debug_getNodeEndText()
Warning: for debugging use only. Implementations must not modify this CalValue in any way. See the implementation of DebugSupport.javaStackShowInternal to see the contract that implementers of this method must adhere to.

Returns:
the end string for this node. Cannot be null.

debug_getChildPrefixText

public abstract String debug_getChildPrefixText(int childN)
Warning: for debugging use only. Implementations must not modify this CalValue in any way. See the implementation of DebugSupport.javaStackShowInternal to see the contract that implementers of this method must adhere to.

Parameters:
childN -
Returns:
string immediately prior to any text for the child at index childN. Cannot be null.

debug_isIndirectionNode

public abstract boolean debug_isIndirectionNode()
Warning: for debugging use only. Implementations must not modify this CalValue in any way. Returns true if this node is only an indirection to another node and thus behaves in all respects like that other node, masking its own identity. If Java supported memory overwrites, then instead of having indirection nodes we could directly update memory to change the type of a node. This method is mainly intended to support cross-machine debugging.

Returns:
true if this node is an indirection node.

getDataType

public abstract CalValue.DataType getDataType()
Returns the type of the underlying value associated with this CalValue. For subclasses that do not represent primitive data types, the value CalValue.DataType.OTHER should be returned.

Returns:
the type of the underlying value associated with this CalValue.

toString

public final String toString()
Overrides:
toString in class Object
Returns:
a string representation of this CalValue for debugging purposes. This representation is subject to change and should not be relied upon in production code. Does not do any evaluation or modify the CalValue in any way.

equals

public final boolean equals(Object other)

Overrides:
equals in class Object

hashCode

public final int hashCode()

Overrides:
hashCode in class Object

internalUnwrapOpaque

public abstract CalValue internalUnwrapOpaque()
Returns:
if this CalValue has type DataType.Object, and the underlying Object is in fact a CalValue, then return that CalValue, otherwise just return this value.

debug_getMachineType

public abstract MachineType debug_getMachineType()
Returns:
the MachineType in which this CalValue was created.

Business Objects
Quark Platform Documentation
Version 1.7.0_0
Business Objects

Copyright © 2007 Business Objects. All rights reserved.