com.telelogic.rhapsody.core
Interface IRPClass

All Superinterfaces:
IRPClassifier, IRPModelElement, IRPUnit
All Known Subinterfaces:
IRPAssociationClass, IRPFlowchart, IRPStatechart

public interface IRPClass
extends IRPClassifier

The IRPClass interface represents classes in Rational Rhapsody models.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.telelogic.rhapsody.core.IRPModelElement
IRPModelElement.OSLCLink
 
Method Summary
 IRPClass addClass(java.lang.String name)
          Adds a class to the current class.
 IRPOperation addConstructor(java.lang.String argumentsData)
          Adds a constructor for the current class.
 IRPOperation addDestructor()
          Adds a destructor for the current class.
 IRPEventReception addEventReception(java.lang.String name)
          Adds an event reception to the current class.
 IRPLink addLink(IRPInstance fromPart, IRPInstance toPart, IRPRelation assoc, IRPPort fromPort, IRPPort toPort)
          This method is used to create a link between two parts belonging to a class.
 IRPLink addLinkToPartViaPort(IRPInstance toPart, IRPInstance partPort, IRPInstance classPort, IRPRelation assoc)
          This method is used to create a delegation connector between a class and one of its parts.
 IRPEventReception addReception(java.lang.String name)
          Adds a reception to the current class.
 void addSuperclass(IRPClass superClass)
          Specifies a base class that the current class should inherit from.
 IRPOperation addTriggeredOperation(java.lang.String name)
          Adds a new triggered operation to the current class.
 IRPType addType(java.lang.String name)
          Adds a new type to the current class.
 void deleteClass(java.lang.String name)
          Deletes the specified class from the current class.
 void deleteConstructor(IRPOperation constructor)
          Deletes the specified constructor from the current class.
 void deleteDestructor()
          Deletes the destructor for the class.
 void deleteEventReception(IRPEventReception pVal)
          Deletes the specified event reception.
 void deleteReception(IRPEventReception pVal)
          Deletes the specified reception from the current class.
 void deleteSuperclass(IRPClass superClass)
          Removes the inheritance relationship with the specified base class.
 void deleteType(java.lang.String name)
          Deletes the specified type from the current class.
 int getIsAbstract()
          Checks whether the class is an abstract class.
 int getIsActive()
          Checks whether the class was defined as "active", meaning that during execution it runs on its own thread.
 int getIsBehaviorOverriden()
          Checks whether a class does not inherit the behavior defined in the statechart of its base class.
 int getIsComposite()
          Checks whether the class is a composite class.
 int getIsFinal()
          Checks whether the class is a final class.
 int getIsReactive()
          Checks whether the class is a reactive class, meaning that a statechart or an activity diagram has been created for the class so that it reacts to events.
 void setIsAbstract(int isAbstract)
          Specifies that the class should be abstract.
 void setIsActive(int isActive)
          Specifies that the class should be defined as "active", meaning that during execution it runs on its own thread.
 void setIsBehaviorOverriden(int isBehaviorOverriden)
          Specifies whether a class should inherit the behavior defined in the statechart of its base class.
 void setIsFinal(int newVal)
          Specifies that the class should be a final class.
 
Methods inherited from interface com.telelogic.rhapsody.core.IRPClassifier
addActivityDiagram, addAttribute, addFlowItems, addFlows, addGeneralization, addOperation, addRelation, addRelationTo, addStatechart, addUnidirectionalRelation, addUnidirectionalRelationTo, deleteAttribute, deleteFlowItems, deleteFlows, deleteGeneralization, deleteOperation, deleteRelation, findAttribute, findBaseClassifier, findDerivedClassifier, findGeneralization, findInterfaceItem, findNestedClassifier, findNestedClassifierRecursive, findRelation, findTrigger, getActivityDiagram, getAttributes, getAttributesIncludingBases, getBaseClassifiers, getBehavioralDiagrams, getDerivedClassifiers, getFlowItems, getFlows, getGeneralizations, getInterfaceItems, getInterfaceItemsIncludingBases, getLinks, getNestedClassifiers, getOperations, getPorts, getRelations, getRelationsIncludingBases, getSequenceDiagrams, getSourceArtifacts, getStatechart
 
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
 

Method Detail

addClass

IRPClass addClass(java.lang.String name)
Adds a class to the current class.

Parameters:
name - the name to use for the new class
Returns:
the new class created

addConstructor

IRPOperation addConstructor(java.lang.String argumentsData)
Adds a constructor for the current class.

Parameters:
argumentsData - the name and types of the arguments for the constructor. The string should use the format "name1,type1,name2,type2", for example "a,int,b,int". For a constructor that does not take arguments, use an empty string ("").
Returns:
the constructor created

addDestructor

IRPOperation addDestructor()
Adds a destructor for the current class.

Returns:
the destructor created

addEventReception

IRPEventReception addEventReception(java.lang.String name)
Adds an event reception to the current class. It is preferable that you use the operation IRPClass.addReception instead.

Parameters:
name - the name to use for the new event reception
Returns:
the event reception created

addLink

IRPLink addLink(IRPInstance fromPart,
                IRPInstance toPart,
                IRPRelation assoc,
                IRPPort fromPort,
                IRPPort toPort)
This method is used to create a link between two parts belonging to a class. In addition to specifying the two parts, you must specify the association that the link should represent, or, alternatively, the two ports that should be used for the link. If you provide the two ports as arguments, you should use Null for the association argument. Similarly, if you specify an association, you should use Null for the two port arguments. Note that if you are not specifying the two ports, you must provide an association as an argument even if there is only one relevant association.

Parameters:
fromPart - the "from" part for the link
toPart - the "to" part for the link
assoc - the association that the link should represent
fromPort - the "from" port for the link
toPort - the "to" port for the link
Returns:
the link created

addLinkToPartViaPort

IRPLink addLinkToPartViaPort(IRPInstance toPart,
                             IRPInstance partPort,
                             IRPInstance classPort,
                             IRPRelation assoc)
This method is used to create a delegation connector between a class and one of its parts. In addition to specifying the part to use, you must specify the association that the link should represent, or, alternatively, the two ports that should be used for the link. If you provide the two ports as arguments, you should use Null for the association argument. Similarly, if you specify an association, you should use Null for the two port arguments. Note that if you are not specifying the two ports, you must provide an association as an argument even if there is only one relevant association.

Parameters:
toPart - the part that should be linked to
partPort - the port to use on the part
classPort - the port to use on the class
assoc - the association that the link should represent
Returns:
the link created

addReception

IRPEventReception addReception(java.lang.String name)
Adds a reception to the current class.

Parameters:
name - the name to use for the new reception
Returns:
the reception created

addSuperclass

void addSuperclass(IRPClass superClass)
Specifies a base class that the current class should inherit from.

Parameters:
superClass - the name of the class that should serve as the base class

addTriggeredOperation

IRPOperation addTriggeredOperation(java.lang.String name)
Adds a new triggered operation to the current class.

Parameters:
name - the name to use for the new triggered operation
Returns:
the triggered operation created

addType

IRPType addType(java.lang.String name)
Adds a new type to the current class.

Parameters:
name - the name to use for the new type
Returns:
the type created

deleteClass

void deleteClass(java.lang.String name)
Deletes the specified class from the current class.

Parameters:
name - the name of the class that should be deleted

deleteConstructor

void deleteConstructor(IRPOperation constructor)
Deletes the specified constructor from the current class.

Parameters:
constructor - the constructor that should be deleted. Note that this parameter is of type IRPOperation.

deleteDestructor

void deleteDestructor()
Deletes the destructor for the class.


deleteEventReception

void deleteEventReception(IRPEventReception pVal)
Deletes the specified event reception. It is preferable that you use the operation IRPClass.deleteReception instead.

Parameters:
pVal - the reception that should be deleted

deleteReception

void deleteReception(IRPEventReception pVal)
Deletes the specified reception from the current class.

Parameters:
pVal - the reception that should be deleted

deleteSuperclass

void deleteSuperclass(IRPClass superClass)
Removes the inheritance relationship with the specified base class.

Parameters:
superClass - the base class of the current class.

deleteType

void deleteType(java.lang.String name)
Deletes the specified type from the current class.

Parameters:
name - the name of the type that should be deleted

getIsAbstract

int getIsAbstract()
Checks whether the class is an abstract class.

Returns:
indication of whether the class is abstract - 1 if the class is abstract, 0 if not

getIsActive

int getIsActive()
Checks whether the class was defined as "active", meaning that during execution it runs on its own thread.

Returns:
indication of whether the class was defined as "active". 1 means that the class is "active", 0 means that the class was defined as "sequential".

getIsBehaviorOverriden

int getIsBehaviorOverriden()
Checks whether a class does not inherit the behavior defined in the statechart of its base class. When you create a statechart for a class, by default it inherits the behavior defined in the statechart of its base class. However, Rhapsody allows you to specify that the class should not inherit this behavior. This operation checks whether this option has been exercised for the current class.

Returns:
indication of whether or not the class inherits the behavior specified in the statechart of its base class. 1 means that it does not inherit this behavior, 0 means that it does inherit the behavior defined in the statechart of the base class.

getIsComposite

int getIsComposite()
Checks whether the class is a composite class.

Returns:
indication of whether the class is a composite class. 1 means that the class is a composite class, 0 means it is not.

getIsFinal

int getIsFinal()
Checks whether the class is a final class. Relevant only for Java classes.

Returns:
indication of whether the class is a final class - 1 if the class is final, 0 if not

getIsReactive

int getIsReactive()
Checks whether the class is a reactive class, meaning that a statechart or an activity diagram has been created for the class so that it reacts to events.

Returns:
indication of whether the class is a reactive class. 1 means that the class is a reactive class, 0 means it is not.

setIsAbstract

void setIsAbstract(int isAbstract)
Specifies that the class should be abstract.

Parameters:
isAbstract - use 1 to specify that the class should be an abstract class, use 0 to specify that it should not be abstract

setIsActive

void setIsActive(int isActive)
Specifies that the class should be defined as "active", meaning that during execution it runs on its own thread.

Parameters:
isActive - 1 means that the class will be defined as "active", 0 means that the class will be defined as "sequential"

setIsBehaviorOverriden

void setIsBehaviorOverriden(int isBehaviorOverriden)
Specifies whether a class should inherit the behavior defined in the statechart of its base class. When you create a statechart for a class, by default it inherits the behavior defined in the statechart of its base class. However, Rhapsody allows you to specify that the class should not inherit this behavior.

Parameters:
isBehaviorOverriden - use 1 if you do not want the class to inherit the behavior defined in the statechart of its base class. Use 0 if you want the class to inherit this behavior.

setIsFinal

void setIsFinal(int newVal)
Specifies that the class should be a final class. Relevant only for Java classes.

Parameters:
newVal - use 1 to specify that the class should be a final class, use 0 to specify that it should not be final