Title: AW: (ROSE) Generate body method

I generate my Get and Set methods by configuring the attribute:
        PropertyType = Simple
        Read/Write = Read&Write

Rose generates the whole methods:


--8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-----
public class NewClass {
  private int attributeName;

  ...

  /**
   * Access method for the attributeName property.
   *
   * @return   the current value of the attributeName property
   */
  public int getAttributeName() {
    return attributeName;
  }
 
  /**
   * Sets the value of the attributeName property.
   *
   * @param aAttributeName the new value of the attributeName property
   */
  public void setAttributeName(int aAttributeName) {
    attributeName = aAttributeName;
  }
}      
--8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-----


Mit freundlichen Gr��en
Jan Mat�rne

RZF NRW
Sachgebiet 314-P Software-Entwicklungs-Methoden
Fiscus AFG NW 42 SoftwareEntwicklungsUmgebung
Internet:       [EMAIL PROTECTED]

    -----Urspr�ngliche Nachricht-----
    Von:    Joaquim Vieira [SMTP:[EMAIL PROTECTED]]
    Gesendet am:    Dienstag, 10. Juli 2001 09:49
    An:     '[EMAIL PROTECTED]'
    Betreff:        (ROSE) Generate body method


    Hi all,

    I'm using Rose Professional J and I try to generate the Get and Set methods
    with a default body for the attributes of my Java classes.

    I have downloaded the script 'generate_gets_and_sets.ebs' from rose server
    and I have adapted it to java language.
    It creates the methods signature but not the body.

    The interesting part of script is

            Set GetOperation = theClass.AddOperation(GetOperationName,
    theAttribute.Type)
            GetOperation.ExportControl.Name = "PublicAccess"
            isOverriden = GetOperation.OverrideProperty("Java", "Inline",
    "False")
            isOverriden = GetOperation.OverrideProperty("Java", "DefaultBody",
    "return " + theAttribute.Name + ";")

    Thanks for help

    Joaquim Vieira
    ---------------------
    Silverpeas
    E-Mail : [EMAIL PROTECTED]
    Tel : 04 76 18 54 90

    ************************************************************************
    * Rose Forum is a public venue for ideas and discussions.
    * For technical support, visit http://www.rational.com/support
    *
    * Admin.Subscription Requests: [EMAIL PROTECTED]
    * Archive of messages: http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
    * Other Requests: [EMAIL PROTECTED]
    *
    * To unsubscribe from the list, please send email
    *
    * To: [EMAIL PROTECTED]
    * Subject:<BLANK>
    * Body: unsubscribe rose_forum
    *
    *************************************************************************

Reply via email to