docs: protected void updateRequiredDeclarations(Constraint constraint) {
          Declaration[] decs = constraint.getRequiredDeclarations();
          if ( decs != null && decs.length > 0 ) {
              for (Declaration dec1 : decs) {
                  Declaration dec = dec1;
                  // check for duplications
                  for (Declaration requiredDeclaration : this.requiredDeclarations) {
                      if (dec.equals(requiredDeclaration)) {
                          dec = null;
                          break;
                      }
                  }
                  if (dec != null) {
                      Declaration[] tmp = this.requiredDeclarations;
                      this.requiredDeclarations = new Declaration[tmp.length + 1];
                      System.arraycopy(tmp,
                              0,
                              this.requiredDeclarations,
                              0,
                              tmp.length);
                      this.requiredDeclarations[this.requiredDeclarations.length - 1] = dec;
                  }
              }
          }
      }