Business Objects
Quark Platform Documentation
Version 1.7.1_0
Business Objects

org.openquark.cal.valuenode
Class AlgebraicValueNode

java.lang.Object
  extended by org.openquark.cal.valuenode.ValueNode
      extended by org.openquark.cal.valuenode.AlgebraicValueNode
Direct Known Subclasses:
AbstractRecordValueNode, ColourValueNode, DataConstructorValueNode, FileNameValueNode, JTimeValueNode, ListOfCharValueNode, RangeValueNode, RelativeTemporalValueNode

public abstract class AlgebraicValueNode
extends ValueNode

AlgebraicValueNode is used as a base class for representing values that within CAL are of a type given by a non-foreign data declaration. In other words they are values of a "algebraic" data type. Such values are decomposable in CAL using case expressions and are not "opaque" from the point of view of CAL.

Author:
Bo Ilic

Constructor Summary
AlgebraicValueNode(TypeExpr typeExpr)
           
 
Method Summary
 ValueNode transmuteValueNode(ValueNodeBuilderHelper valueNodeBuilderHelper, ValueNodeTransformer valueNodeTransformer, TypeExpr newTypeExpr)
          Returns a new ValueNode according to type TypeExpr, and modeled after valueNode (which means that the returned ValueNode will have as much common data as possible with valueNode)..
 
Methods inherited from class org.openquark.cal.valuenode.ValueNode
checkCopyType, checkTypeConstructorName, containsParametricValue, copyValueNode, copyValueNode, getCALSourceModel, getCALValue, getInputJavaValues, getInputPolicy, getOutputPolicy, getTextValue, getTypeExpr, getValue, sameValue, setOutputJavaValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AlgebraicValueNode

public AlgebraicValueNode(TypeExpr typeExpr)
Method Detail

transmuteValueNode

public ValueNode transmuteValueNode(ValueNodeBuilderHelper valueNodeBuilderHelper,
                                    ValueNodeTransformer valueNodeTransformer,
                                    TypeExpr newTypeExpr)
Description copied from class: ValueNode
Returns a new ValueNode according to type TypeExpr, and modeled after valueNode (which means that the returned ValueNode will have as much common data as possible with valueNode).. This will return a new ValueNode with newTypeExpr as its assigned type expression. It does NOT provide a copy of the newTypeExpr. So be careful not to share this newTypeExpr amongst multiple nodes! However, to copy the value of valueNode over to the returned ValueNode, the newTypeExpr that you pass in must be compatible with the type expression of the value node that you are copying from. (Which means you should create a new TypeExpr and call TransmuteTypeExpr on it to have it correspond), Otherwise, the valueNode that you create will really have nothing in common with the valueNode.

Specified by:
transmuteValueNode in class ValueNode
Returns:
ValueNode a new ValueNode with newTypeExpr as its TypeExpr, and having as much common data with this ValueNode as possible.
See Also:
ValueNode.transmuteValueNode(ValueNodeBuilderHelper, ValueNodeTransformer, TypeExpr)

Business Objects
Quark Platform Documentation
Version 1.7.1_0
Business Objects

Copyright © 2007 Business Objects. All rights reserved.