ibm Rational Rhapsody 7.5 — Port code generation in Java

Selecting which ports to display in the diagram Port code generation in Java The following operations are used for working with ports and events in Java: Љ Calling an operation: – for port called MyPort and operation called myop: getMyPort().myop(); – for port called MyPort, operation called myop, and multiplicity greater than 1: getMyPortAt( port index ).myop(), for example, getMyPortAt(2).myop(); Љ Generating and sending an event via a port: – for port called MyPort and event called evt: getMyPort().gen(new evt()); – for port called MyPort, event called e2, and multiplicity greater than 1:

getMyPortAt( port index ).gen(new e2()), for example, getMyPortAt(2).gen(new e2()); Љ Detecting the input port through which an event has been sent: – for port called MyPort: isPort(getMyPort()) – for port called MyPort, and multiplicity greater than 1: isPort(getMyPort( port index )), for example, isPort(getMyPort(3)) Rational Rhapsody 105