int (List<FormatStringChunk> results, int end, int autoPositionedFieldsCount) { final NewStyleSubstitutionChunk chunk = new NewStyleSubstitutionChunk(myPos); chunk.setEndIndex(end); // skip "{" myPos++; // name final int nameEnd = StringUtil.indexOfAny(myLiteral, "!:.[}", myPos, end); if (nameEnd > 0 && myPos < nameEnd) { final String name = myLiteral.substring(myPos, nameEnd); try { final int number = Integer.parseInt(name); chunk.setManualPosition(number); } catch (NumberFormatException e) { chunk.setMappingKey(name); } myPos = nameEnd; } else { chunk.setAutoPosition(autoPositionedFieldsCount); autoPositionedFieldsCount++; } // parse field name attribute name if (isAt('.')) { myPos++; final int attributeEnd = StringUtil.indexOfAny(myLiteral, "!:.[}", myPos, end); if (attributeEnd > 0 && myPos < attributeEnd) { final String attributeName = myLiteral.substring(myPos, attributeEnd); chunk.setMappingKeyAttributeName(attributeName); myPos = attributeEnd; } }