ptolemy.actor.util
Class ActorTypeUtil.TypeableSizedArrayVariableTypeTerm

java.lang.Object
  extended by ptolemy.data.type.MonotonicFunction
      extended by ptolemy.actor.util.ActorTypeUtil.TypeableSizedArrayVariableTypeTerm
All Implemented Interfaces:
InequalityTerm
Enclosing class:
ActorTypeUtil

private static class ActorTypeUtil.TypeableSizedArrayVariableTypeTerm
extends MonotonicFunction

An InequalityTerm representing an array types whose elements have the type of the specified typeable. The purpose of this class is to defer to as late as possible actually accessing the type of the typeable, since it may change dynamically. This term is not variable and cannot be set.


Field Summary
private  ArrayType _arrayType
          The array type with element types matching the typeable.
private  Variable _lengthVariable
           
private  Typeable _typeable
          The associated typeable.
 
Constructor Summary
ActorTypeUtil.TypeableSizedArrayVariableTypeTerm(Typeable typeable, Variable lengthVariable)
          Construct a term that will defer to the type of the specified typeable.
 
Method Summary
private  ArrayType _getArrayTypeRaw()
          Get an array type with element type matching the type of the associated typeable.
private  ArrayType _getArrayTypeRaw(int length)
          Get an array type with element type matching the type of the associated typeable.
 java.lang.Object getValue()
          Return an array type with element types given by the associated typeable.
 InequalityTerm[] getVariables()
          Return an array of size zero.
 
Methods inherited from class ptolemy.data.type.MonotonicFunction
getAssociatedObject, getVerboseString, initialize, isSettable, isValueAcceptable, setValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_typeable

private Typeable _typeable
The associated typeable.


_arrayType

private ArrayType _arrayType
The array type with element types matching the typeable.


_lengthVariable

private Variable _lengthVariable
Constructor Detail

ActorTypeUtil.TypeableSizedArrayVariableTypeTerm

public ActorTypeUtil.TypeableSizedArrayVariableTypeTerm(Typeable typeable,
                                                        Variable lengthVariable)
Construct a term that will defer to the type of the specified typeable.

Parameters:
typeable - The object to defer requests to.
Method Detail

getValue

public java.lang.Object getValue()
                          throws IllegalActionException
Return an array type with element types given by the associated typeable.

Specified by:
getValue in interface InequalityTerm
Specified by:
getValue in class MonotonicFunction
Returns:
An ArrayType.
Throws:
IllegalActionException - If the type of the associated typeable cannot be determined.
See Also:
MonotonicFunction.setValue(Object)

getVariables

public InequalityTerm[] getVariables()
Return an array of size zero.

Specified by:
getVariables in interface InequalityTerm
Specified by:
getVariables in class MonotonicFunction
Returns:
An array of InequalityTerm.

_getArrayTypeRaw

private ArrayType _getArrayTypeRaw()
                            throws IllegalActionException
Get an array type with element type matching the type of the associated typeable.

Returns:
An array type for the associated typeable.
Throws:
IllegalActionException - If the type of the typeable cannot be determined.

_getArrayTypeRaw

private ArrayType _getArrayTypeRaw(int length)
                            throws IllegalActionException
Get an array type with element type matching the type of the associated typeable.

Returns:
An array type for the associated typeable.
Throws:
IllegalActionException - If the type of the typeable cannot be determined.