Details

    • Type: Feature Request
    • Status: Open (View Workflow)
    • 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);
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  kaijmueller Anonymous Anonymous (Inactive)
                  Reporter:
                  agoncal Antonio Goncalves
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated: