Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-13511 Unified configuration
  3. IGNITE-14087

Implement code generation for interfaces introduced in IGNITE-14062

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-alpha2
    • None

    Description

      I expect to see following code to be created with all used interfaces:

      public final class RestNode extends InnerNode implements RestView, RestChange, RestInit {
          private Integer port;
      
          private Integer portRange;
      
          @Override
          public int port() {
              return port;
          }
      
          @Override
          public RestChange changePort(int port) {
              this.port = port;
              return this;
          }
      
          @Override
          public RestInit initPort(int port) {
              this.port = port;
              return this;
          }
      
          @Override
          public int portRange() {
              return portRange;
          }
      
          @Override
          public RestChange changePortRange(int portRange) {
              this.portRange = portRange;
              return this;
          }
      
          @Override
          public RestInit initPortRange(int portRange) {
              this.portRange = portRange;
              return this;
          }
      
          /**
           * {@inheritDoc}
           */
          @Override
          public void traverseChildren(ConfigurationVisitor visitor) {
              visitor.visitLeafNode("port", port);
              visitor.visitLeafNode("portRange", portRange);
          }
      
          /**
           * {@inheritDoc}
           */
          @Override
          public void traverseChild(String key, ConfigurationVisitor visitor) throws NoSuchElementException {
              switch (key) {
                  case "port": visitor.visitLeafNode("port", port);
                      break;
                  case "portRange": visitor.visitLeafNode("portRange", portRange);
                      break;
                  default: throw new NoSuchElementException(key);
              }
          }
      }
      

      Attachments

        Issue Links

          Activity

            People

              ibessonov Ivan Bessonov
              ibessonov Ivan Bessonov
              Sergey Chugunov Sergey Chugunov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m