public class PtinyOSNodeParameter extends SharedParameter
An instance elsewhere in the model (within the same top level) is shared if it has the same type and its container is of the class specified in the constructor (or of the container class, if no class is specified in the constructor).
One exception is that if this parameter is (deeply) within an instance of EntityLibrary, then the parameter is not shared. Were this not the case, then opening a library containing this parameter would force expansion of all the sublibraries of EntityLibrary, which would defeat the lazy instantiation of EntityLibrary.
This parameter is always of type int.
Variable.CircularDependencyError, Variable.VariableScope
NamedObj.ContainedObjectsIterator
Settable.Visibility
_currentExpression, _needsEvaluation, _parserScope, _parseTreeValid, _suppressVariableSubstitution, _valueListeners
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
EXPERT, FULL, NONE, NOT_EDITABLE
Constructor and Description |
---|
PtinyOSNodeParameter(NamedObj container,
java.lang.String name)
Construct a parameter with the given container and name.
|
PtinyOSNodeParameter(NamedObj container,
java.lang.String name,
java.lang.Class containerClass)
Construct a parameter with the given container, name, and
container class, using the default value.
|
PtinyOSNodeParameter(NamedObj container,
java.lang.String name,
java.lang.Class containerClass,
int incrementValue)
Construct a parameter with the given container, name, and
container class, using the default value.
|
PtinyOSNodeParameter(NamedObj container,
java.lang.String name,
int incrementValue)
Construct a parameter with the given container and name.
|
Modifier and Type | Method and Description |
---|---|
void |
inferValueFromContext(java.lang.String defaultValue)
Override the base class to set the declared type before
attempting to infer the value.
|
void |
setExpression(java.lang.String expression)
Set the expression of the shared parameters.
|
_propagateValue, addInitializable, clone, getRoot, getToken, initialize, isFireFunctional, isStrict, isSuppressingPropagation, preinitialize, removeInitializable, setContainer, setName, setSuppressingPropagation, setToken, sharedParameterSet, validate, wrapup
addChoice, 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, valueChanged
getDefaultExpression
_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, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDisplayName
description, getContainer, getFullName, getName, getName
public PtinyOSNodeParameter(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 PtinyOSNodeParameter(NamedObj container, java.lang.String name, int incrementValue) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of the parameter.incrementValue
- The value with which to increment
subsequent parameters.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 PtinyOSNodeParameter(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 PtinyOSNodeParameter(NamedObj container, java.lang.String name, java.lang.Class containerClass, int incrementValue) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of the parameter.containerClass
- The class used to determine shared instances.incrementValue
- The value with which to increment
subsequent parameters.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 void inferValueFromContext(java.lang.String defaultValue)
inferValueFromContext
in class SharedParameter
defaultValue
- The default parameter value to use.InternalErrorException
- If there are multiple
shared parameters in the model, but their values
do not match.public void setExpression(java.lang.String expression)
setExpression
in interface Settable
setExpression
in class SharedParameter
expression
- The expression.Variable.getExpression()