com.telelogic.rhapsody.core
Interface IRPVariable
- All Superinterfaces:
- IRPModelElement, IRPUnit
- All Known Subinterfaces:
- IRPArgument, IRPAttribute, IRPTag, IRPTemplateParameter
public interface IRPVariable
- extends IRPUnit
The IRPVariable interface represents the characteristics shared by model elements such as attributes, variables, and arguments.
Method Summary |
IRPInstanceValue |
addElementDefaultValue(IRPModelElement newDefaultVal)
For tags with multiplicity greater than 1, this method can be used to add a model element as an additional value. |
IRPLiteralSpecification |
addStringDefaultValue(java.lang.String newDefaultVal)
For tags with multiplicity greater than 1, this method can be used to add a string as an additional value. |
java.lang.String |
getDeclaration()
Returns the type declaration if an on-the-fly type was used for the element rather than an existing type. |
java.lang.String |
getDefaultValue()
Returns the default value that was set for the variable. |
IRPClassifier |
getType()
Returns the type of the variable. |
IRPCollection |
getValueSpecifications()
Returns a collection of the initial values that were declared for elements where the multiplicity is greater than one. |
void |
setDeclaration(java.lang.String declaration)
Specifies an "on-the-fly" declaration for the type of the element instead of using an existing type. |
void |
setDefaultValue(java.lang.String defaultValue)
Sets a new default value for the variable. |
void |
setType(IRPClassifier type)
Sets the type of the variable. |
void |
setTypeDeclaration(java.lang.String newVal)
Specifies an "on-the-fly" declaration for the type of the element but first checks whether there is an existing type that matches the string provided as an argument. |
Methods inherited from interface com.telelogic.rhapsody.core.IRPUnit |
copyToAnotherProject, getAddToModelMode, getCMHeader, getCMState, getCurrentDirectory, getFilename, getIncludeInNextLoad, getIsStub, getLanguage, getLastModifiedTime, getNestedSaveUnits, getNestedSaveUnitsCount, getStructureDiagrams, isReadOnly, isReferenceUnit, isSeparateSaveUnit, load, moveToAnotherProjectLeaveAReference, referenceToAnotherProject, save, setCMHeader, setFilename, setIncludeInNextLoad, setLanguage, setReadOnly, setSeparateSaveUnit, setUnitPath, unload |
Methods inherited from interface com.telelogic.rhapsody.core.IRPModelElement |
addAssociation, addDependency, addDependencyBetween, addDependencyTo, addLinkToElement, addNewAggr, addProperty, addRedefines, addRemoteDependencyTo, addSpecificStereotype, addStereotype, becomeTemplateInstantiationOf, changeTo, clone, createOSLCLink, deleteDependency, deleteFromProject, deleteOSLCLink, errorMessage, findElementsByFullName, findNestedElement, findNestedElementRecursive, getAllTags, getAnnotations, getAssociationClasses, getBinaryID, getConstraints, getConstraintsByHim, getControlledFiles, getDecorationStyle, getDependencies, getDescription, getDescriptionHTML, getDescriptionPlainText, getDescriptionRTF, getDisplayName, getDisplayNameRTF, getErrorMessage, getFullPathName, getFullPathNameIn, getGUID, getHyperLinks, getIconFileName, getInterfaceName, getIsExternal, getIsOfMetaClass, getIsShowDisplayName, getIsUnresolved, getLocalTags, getMainDiagram, getMetaClass, getName, getNestedElements, getNestedElementsByMetaClass, getNestedElementsRecursive, getNewTermStereotype, getOfTemplate, getOSLCLinks, getOverlayIconFileName, getOverriddenProperties, getOverriddenPropertiesByPattern, getOwnedDependencies, getOwner, getProject, getPropertyValue, getPropertyValueConditional, getPropertyValueConditionalExplicit, getPropertyValueExplicit, getRedefines, getReferences, getRemoteDependencies, getRemoteURI, getRequirementTraceabilityHandle, getSaveUnit, getStereotype, getStereotypes, getTag, getTemplateParameters, getTi, getToolTipHTML, getUserDefinedMetaClass, hasNestedElements, hasPanelWidget, highLightElement, isATemplate, isDescriptionRTF, isDisplayNameRTF, isModified, isRemote, locateInBrowser, lockOnDesignManager, openFeaturesDialog, removeProperty, removeRedefines, removeStereotype, setDecorationStyle, setDescription, setDescriptionAndHyperlinks, setDescriptionHTML, setDescriptionRTF, setDisplayName, setDisplayNameRTF, setGUID, setIsShowDisplayName, setMainDiagram, setName, setOfTemplate, setOwner, setPropertyValue, setRequirementTraceabilityHandle, setStereotype, setTagContextValue, setTagElementValue, setTagValue, setTi, synchronizeTemplateInstantiation, unlockOnDesignManager |
addElementDefaultValue
IRPInstanceValue addElementDefaultValue(IRPModelElement newDefaultVal)
- For tags with multiplicity greater than 1, this method can be used to add a model element as an additional value.
- Parameters:
newDefaultVal
- the model element to add as an additional value
- Returns:
- the value that was added
addStringDefaultValue
IRPLiteralSpecification addStringDefaultValue(java.lang.String newDefaultVal)
- For tags with multiplicity greater than 1, this method can be used to add a string as an additional value.
- Parameters:
newDefaultVal
- the string to add as an additional value
- Returns:
- the value that was added
getDeclaration
java.lang.String getDeclaration()
- Returns the type declaration if an on-the-fly type was used for the element rather than an existing type.
- Returns:
- the type declaration if an on-the-fly type was used for the element
getDefaultValue
java.lang.String getDefaultValue()
- Returns the default value that was set for the variable.
- Returns:
- the default value of the variable
getType
IRPClassifier getType()
- Returns the type of the variable.
- Returns:
- the type of the variable
getValueSpecifications
IRPCollection getValueSpecifications()
- Returns a collection of the initial values that were declared for elements where the multiplicity is greater than one. Note that the type of the objects contained in the returned collection depends upon the the type of element on which this method was called (there are a number of element types that inherit from IRPVariable). When the method is called on a tag, the objects in the returned collection are of type IRPContextSpecification. These objects are created for a tag when you call the method IRPModelElement.setTagContextValue.
- Returns:
- the initial values that were declared for elements where the multiplicity is greater than one
- See Also:
IRPModelElement.setTagContextValue(com.telelogic.rhapsody.core.IRPTag, com.telelogic.rhapsody.core.IRPCollection, com.telelogic.rhapsody.core.IRPCollection)
setDeclaration
void setDeclaration(java.lang.String declaration)
- Specifies an "on-the-fly" declaration for the type of the element instead of using an existing type. Note that the string that you provide will be used as the declaration for the type even if if matches an existing type. For example, if you call this method with the argument "int", it will create an on-the-fly declaration consisting of "int". Use the method setTypeDeclaration if you want Rhapsody to first check whether there is an existing type with that name.
- Parameters:
declaration
- the on-the-fly declaration to use for the type of the element
setDefaultValue
void setDefaultValue(java.lang.String defaultValue)
- Sets a new default value for the variable.
- Parameters:
defaultValue
- the default value to use for the variable
setType
void setType(IRPClassifier type)
- Sets the type of the variable.
- Parameters:
type
- the type to use for the variable
setTypeDeclaration
void setTypeDeclaration(java.lang.String newVal)
- Specifies an "on-the-fly" declaration for the type of the element but first checks whether there is an existing type that matches the string provided as an argument. If there is such a type, it will be used as the type of the model element. Note that this method is slower than the method setDeclaration because it first carries out a search. So if you definitely want to use an on-the-fly declaration, use the method setDeclaration instead.
- Parameters:
newVal
- the type to use for the type of the element