public class ActorTypeUtil
extends java.lang.Object
This class includes a number of utility methods and classes that simplify the generation of type constraints.
Constructor and Description |
---|
ActorTypeUtil() |
Modifier and Type | Method and Description |
---|---|
static InequalityTerm |
arrayOf(Typeable typeable,
Variable length)
Return a type constraint that can be used to constrain
another typeable object to have a type related to an
array whose element type is the type of the specified
typeable.
|
public static InequalityTerm arrayOf(Typeable typeable, Variable length) throws IllegalActionException
output.setTypeAtLeast(ArrayType.arrayOf(input, length));where input and output are ports (this is the type constraint of SequenceToArray, for example), and length is a Variable that determines the length of the array. If length has a constant value, then the resulting type will have a length specified. If length does not have a constant value, the the type will have an indeterminate length.
typeable
- A typeable.length
- Variable specifying the length of array.IllegalActionException
- If the specified typeable
cannot be set to an array type.