Esempio n. 1
0
  private Child(final com.dslplatform.json.JsonReader<org.revenj.patterns.ServiceLocator> reader)
      throws java.io.IOException {

    String _URI_ = "";
    this.__locator = java.util.Optional.ofNullable(reader.context);
    long _version_ = 0L;
    int _AuthorID_ = 0;
    int _Index_ = 0;
    byte nextToken = reader.last();
    if (nextToken != '}') {
      int nameHash = reader.fillName();
      nextToken = reader.getNextToken();
      if (nextToken == 'n') {
        if (reader.wasNull()) {
          nextToken = reader.getNextToken();
        } else {
          throw new java.io.IOException(
              "Expecting 'u' (as null) at position "
                  + reader.positionInStream()
                  + ". Found "
                  + (char) nextToken);
        }
      } else {
        switch (nameHash) {
          case 2053729053:
            _URI_ = reader.readString();
            nextToken = reader.getNextToken();
            break;
          case 1181855383:
            _version_ = com.dslplatform.json.NumberConverter.deserializeLong(reader);
            nextToken = reader.getNextToken();
            break;
          case 23797067:
            _AuthorID_ = com.dslplatform.json.NumberConverter.deserializeInt(reader);
            nextToken = reader.getNextToken();
            break;
          case -1362645429:
            _Index_ = com.dslplatform.json.NumberConverter.deserializeInt(reader);
            nextToken = reader.getNextToken();
            break;
          default:
            nextToken = reader.skip();
            break;
        }
      }
      while (nextToken == ',') {
        nextToken = reader.getNextToken();
        nameHash = reader.fillName();
        nextToken = reader.getNextToken();
        if (nextToken == 'n') {
          if (reader.wasNull()) {
            nextToken = reader.getNextToken();
            continue;
          } else {
            throw new java.io.IOException(
                "Expecting 'u' (as null) at position "
                    + reader.positionInStream()
                    + ". Found "
                    + (char) nextToken);
          }
        }
        switch (nameHash) {
          case 2053729053:
            _URI_ = reader.readString();
            nextToken = reader.getNextToken();
            break;
          case 1181855383:
            _version_ = com.dslplatform.json.NumberConverter.deserializeLong(reader);
            nextToken = reader.getNextToken();
            break;
          case 23797067:
            _AuthorID_ = com.dslplatform.json.NumberConverter.deserializeInt(reader);
            nextToken = reader.getNextToken();
            break;
          case -1362645429:
            _Index_ = com.dslplatform.json.NumberConverter.deserializeInt(reader);
            nextToken = reader.getNextToken();
            break;
          default:
            nextToken = reader.skip();
            break;
        }
      }
      if (nextToken != '}') {
        throw new java.io.IOException(
            "Expecting '}' at position "
                + reader.positionInStream()
                + ". Found "
                + (char) nextToken);
      }
    }

    this.URI = _URI_;
    this.version = _version_;
    this.AuthorID = _AuthorID_;
    this.Index = _Index_;
  }
Esempio n. 2
0
  private ArticleGrid(
      final com.dslplatform.json.JsonReader<org.revenj.patterns.ServiceLocator> reader)
      throws java.io.IOException {

    String _URI_ = "";
    long _ID_ = 0L;
    int _projectID_ = 0;
    String _sku_ = "";
    String _title_ = "";
    byte nextToken = reader.last();
    if (nextToken != '}') {
      int nameHash = reader.fillName();
      nextToken = reader.getNextToken();
      if (nextToken == 'n') {
        if (reader.wasNull()) {
          nextToken = reader.getNextToken();
        } else {
          throw new java.io.IOException(
              "Expecting 'u' (as null) at position "
                  + reader.positionInStream()
                  + ". Found "
                  + (char) nextToken);
        }
      } else {
        switch (nameHash) {
          case 2053729053:
            _URI_ = reader.readString();
            nextToken = reader.getNextToken();
            break;
          case 1458105184:
            _ID_ = com.dslplatform.json.NumberConverter.deserializeLong(reader);
            nextToken = reader.getNextToken();
            break;
          case 504496707:
            _projectID_ = com.dslplatform.json.NumberConverter.deserializeInt(reader);
            nextToken = reader.getNextToken();
            break;
          case -651451878:
            _sku_ = com.dslplatform.json.StringConverter.deserialize(reader);
            nextToken = reader.getNextToken();
            break;
          case -1738164983:
            _title_ = com.dslplatform.json.StringConverter.deserialize(reader);
            nextToken = reader.getNextToken();
            break;
          default:
            nextToken = reader.skip();
            break;
        }
      }
      while (nextToken == ',') {
        nextToken = reader.getNextToken();
        nameHash = reader.fillName();
        nextToken = reader.getNextToken();
        if (nextToken == 'n') {
          if (reader.wasNull()) {
            nextToken = reader.getNextToken();
            continue;
          } else {
            throw new java.io.IOException(
                "Expecting 'u' (as null) at position "
                    + reader.positionInStream()
                    + ". Found "
                    + (char) nextToken);
          }
        }
        switch (nameHash) {
          case 2053729053:
            _URI_ = reader.readString();
            nextToken = reader.getNextToken();
            break;
          case 1458105184:
            _ID_ = com.dslplatform.json.NumberConverter.deserializeLong(reader);
            nextToken = reader.getNextToken();
            break;
          case 504496707:
            _projectID_ = com.dslplatform.json.NumberConverter.deserializeInt(reader);
            nextToken = reader.getNextToken();
            break;
          case -651451878:
            _sku_ = com.dslplatform.json.StringConverter.deserialize(reader);
            nextToken = reader.getNextToken();
            break;
          case -1738164983:
            _title_ = com.dslplatform.json.StringConverter.deserialize(reader);
            nextToken = reader.getNextToken();
            break;
          default:
            nextToken = reader.skip();
            break;
        }
      }
      if (nextToken != '}') {
        throw new java.io.IOException(
            "Expecting '}' at position "
                + reader.positionInStream()
                + ". Found "
                + (char) nextToken);
      }
    }

    this.URI = _URI_;
    this.ID = _ID_;
    this.projectID = _projectID_;
    this.sku = _sku_;
    this.title = _title_;
  }