public class TestSharedParameter extends SharedParameter
Variable.CircularDependencyError, Variable.VariableScopeNamedObj.ContainedObjectsIteratorSettable.Visibility| Modifier and Type | Field and Description |
|---|---|
int |
inferValueFromContextCount |
int |
isSuppressingPropagationCount |
int |
propagateValueCount |
int |
setExpressionCount |
int |
sharedParameterSetCount |
int |
validateCount |
_currentExpression, _needsEvaluation, _parserScope, _parseTreeValid, _suppressVariableSubstitution, _valueListeners_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKSEXPERT, FULL, NONE, NOT_EDITABLE| Constructor and Description |
|---|
TestSharedParameter(NamedObj container,
java.lang.String name)
Construct a parameter with the given container and name.
|
TestSharedParameter(NamedObj container,
java.lang.String name,
java.lang.Class containerClass)
Construct a parameter with the given container, name, and
container class.
|
TestSharedParameter(NamedObj container,
java.lang.String name,
java.lang.Class containerClass,
java.lang.String defaultValue)
Construct a parameter with the given container, name,
container class, and default value.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
_propagateValue(NamedObj destination)
Override the base class to do the propagation only if
the specified destination is not shared.
|
java.lang.String |
getCounts()
Return the current counts.
|
void |
inferValueFromContext(java.lang.String defaultValue)
Infer the value of this parameter from the container
context.
|
boolean |
isSuppressingPropagation()
Return true if this instance is suppressing propagation.
|
void |
setExpression(java.lang.String expression)
Override the base class to also set the expression of shared
parameters.
|
java.util.Collection |
sharedParameterSet()
Return a collection of all the shared parameters within the
same model as this parameter.
|
java.util.Collection |
validate()
Override the base class to also validate the shared instances.
|
addInitializable, clone, getRoot, getToken, initialize, isFireFunctional, isStrict, preinitialize, removeInitializable, setContainer, setName, setSuppressingPropagation, setToken, wrapupaddChoice, exportMoML, getChoices, removeAllChoices, removeChoice_description, _evaluate, _getCurrentExpression, _notifyValueListeners, _parseIfNecessary, _propagate, _propagateToValueListeners, _setToken, _setTokenAndNotify, addValueListener, attributeChanged, getDeclaredType, getExpression, getFreeIdentifiers, getParserScope, getScope, getScope, getType, getTypeTerm, getValueAsString, getVariable, getVisibility, invalidate, isKnown, isLazy, isStringMode, isSuppressVariableSubstitution, isTypeAcceptable, removeValueListener, reset, setLazy, setParseTreeEvaluator, setStringMode, setSuppressVariableSubstitution, setToken, setTypeAtLeast, setTypeAtLeast, setTypeAtMost, setTypeEquals, setTypeSameAs, setUnknown, setValueListenerAsWeakDependency, setVisibility, stringRepresentation, toString, typeConstraintList, typeConstraints, valueChangedgetDefaultExpression_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, updateContent_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, uniqueName, validateSettables, workspaceequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDisplayNamedescription, getContainer, getFullName, getName, getNamepublic int inferValueFromContextCount
public int isSuppressingPropagationCount
public int setExpressionCount
public int sharedParameterSetCount
public int validateCount
public int propagateValueCount
public TestSharedParameter(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container - The container.name - The name of the parameter.IllegalActionException - If the parameter is not of an
acceptable class for the container.NameDuplicationException - If the name coincides with
a parameter already in the container.public TestSharedParameter(NamedObj container, java.lang.String name, java.lang.Class containerClass) throws IllegalActionException, NameDuplicationException
container - The container.name - The name of the parameter.containerClass - The class used to determine shared instances.IllegalActionException - If the parameter is not of an
acceptable class for the container.NameDuplicationException - If the name coincides with
a parameter already in the container.public TestSharedParameter(NamedObj container, java.lang.String name, java.lang.Class containerClass, java.lang.String defaultValue) throws IllegalActionException, NameDuplicationException
container - The container.name - The name of the parameter.containerClass - The class used to determine shared instances.defaultValue - The default value to use if the container's
model has no shared parameters.IllegalActionException - If the parameter is not of an
acceptable class for the container, or an empty string to specify no
default value.NameDuplicationException - If the name coincides with
a parameter already in the container.public void inferValueFromContext(java.lang.String defaultValue)
inferValueFromContext in class SharedParameterdefaultValue - The default parameter value to give.InternalErrorException - If there are multiple
shared parameters in the model, but their values
do not match.public boolean isSuppressingPropagation()
isSuppressingPropagation in class SharedParameterSharedParameter.setSuppressingPropagation(boolean)public void setExpression(java.lang.String expression)
setExpression in interface SettablesetExpression in class SharedParameterexpression - The expression.Variable.getExpression()public java.util.Collection sharedParameterSet()
sharedParameterSet in class SharedParameterpublic java.util.Collection validate() throws IllegalActionException
validate in interface Settablevalidate in class SharedParameterSharedParameter.sharedParameterSet().IllegalActionException - If this variable or a
variable dependent on this variable cannot be evaluated (and is
not lazy) and the model error handler throws an exception.
Also thrown if the change is not acceptable to the container.protected void _propagateValue(NamedObj destination) throws IllegalActionException
_propagateValue in class SharedParameterdestination - Object to which to propagate the
value.IllegalActionException - If the value cannot
be propagated.public java.lang.String getCounts()