Uploaded image for project: 'Roaster'
  1. Roaster
  2. ROASTER-5

Having method parameters a bit more typed

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.1.0.Final
    • Fix Version/s: 2.2.0.Final
    • Component/s: API
    • Labels:
      None

      Description

      I want to create a Bean Validation implementation, that means that the isValid method takes two parameters. And the only way to add two parameters seems to be by a String

      javaClass.addMethod().setPublic().setName("isValid").setReturnType("boolean").setParameters("Number value, ConstraintValidatorContext context").setBody("return false;").addAnnotation(Override.class);
      

      It would be nice to have typed parameters so the import is implicit, and things are a bit more typed :

      javaClass.addMethod().setPublic().setName("isValid").setReturnType("boolean").addParameter(Number.class, "value").addParameter(ConstraintValidatorContext.class, "context").setBody("return false;").addAnnotation(Override.class);
      

        Attachments

          Activity

            People

            Assignee:
            gastaldi George Gastaldi
            Reporter:
            agoncal Antonio Goncalves (Inactive)
            Archiver:
            samahaja Sagar Mahajan

              Dates

              Created:
              Updated:
              Resolved:
              Archived: