Uploaded image for project: 'The AndroMDA project'
  1. The AndroMDA project
  2. ANDROMDA-794

generated application exceptions should have getters/setters for its attributes generated

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4
    • Component/s: Java Cartridge
    • Labels:
      None
    • Environment:

      WindowsXP, AndroMDA 3.0

      Description

      <<ApplicationException>> class is generated as java exception, but the generator ignores attributes defined in the class and does not generate getters/setters. I tried to add <<ValueObject>> stereotype but it didn't work either. Finally I modified the ApplicationException.vsl and added

      #foreach ($attribute in $class.attributes)
      private $attribute.getterSetterTypeName $attribute.name;

      /**
      $attribute.getDocumentation(" * ")
      */
      $attribute.visibility $attribute.getterSetterTypeName $

      {attribute.getterName}

      ()
      {
      return this.$

      {attribute.name};
      }

      $attribute.visibility void ${attribute.setterName}($attribute.getterSetterTypeName $attribute.name)
      {
      this.${attribute.name}

      = $attribute.name;
      }

      #end

      before final
      #parse("templates/java/ExceptionUtils.vm")
      command.

        Attachments

          Activity

            People

            • Assignee:
              overheat Plushnikov Michail
              Reporter:
              m.vysny Martin Vysny
            • Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: