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

Having Parameterize interface 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: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.0.Final
    • Fix Version/s: 2.x Future
    • Component/s: API
    • Labels:
      None

      Description

      For a constraint, I need to implement a parametrize interface like this :

      public class MaxValidatorForString implements ConstraintValidator<Max, Number> {
      

      The only way I could find is by passing a String :

      final JavaClassSource javaClass = Roaster.create(JavaClassSource.class);
      javaClass.setName("MaxValidatorForString");
      javaClass.addImport(ConstraintValidator.class);
      javaClass.addInterface("ConstraintValidator<Max, Number>");
      

      It's a shame because with addInterface(Class), it does the import automatically and things are more typed. But I cannot add types :

      final JavaClassSource javaClass = Roaster.create(JavaClassSource.class);
      javaClass.setName("MaxValidatorForString");
      javaClass.addInterface(ConstraintValidator.class);
      

      It would be good to have something like :

      javaClass.addInterface(ConstraintValidator.class).addType(Max.class).addType(Number.class);
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kaijmueller Anonymous Anonymous (Inactive)
              Reporter:
              agoncal Antonio Goncalves (Inactive)
              Archiver:
              samahaja Sagar Mahajan

                Dates

                Created:
                Updated:
                Archived: