@Override public JsonLocation getStartLocation(Object srcRef) { // We don't keep track of offsets at this level (only reader does) long totalChars = -1L; return new JsonLocation(srcRef, totalChars, _lineNr, _columnNr); }
@Override public JsonLocation getStartLocation(Object srcRef) { // We don't keep track of offsets at this level (only reader does) long totalChars = -1L; return new JsonLocation(srcRef, totalChars, _lineNr, _columnNr); }
@Override public JsonLocation getCurrentLocation() { int col = _inputPtr - _currInputRowStart + 1; // 1-based return new JsonLocation(_getSourceReference(), _currInputProcessed + _inputPtr, -1L, // bytes, chars _currInputRow, col); }
@Override public JsonLocation getCurrentLocation() { int col = _inputPtr - _currInputRowStart + 1; // 1-based return new JsonLocation(_getSourceReference(), -1L, _currInputProcessed + _inputPtr, _currInputRow, col); }
@Override public JsonLocation getCurrentLocation() { int col = _inputPtr - _currInputRowStart + 1; // 1-based // Since we track CR and LF separately, max should gives us right answer int row = Math.max(_currInputRow, _currInputRowAlt); return new JsonLocation(_getSourceReference(), _currInputProcessed + (_inputPtr - _currBufferStart), -1L, // bytes, chars row, col); }
@Override public JsonLocation getTokenLocation() { if (_currToken == JsonToken.FIELD_NAME) { long total = _currInputProcessed + (_nameStartOffset-1); return new JsonLocation(_getSourceReference(), total, -1L, _nameStartRow, _nameStartCol); } return new JsonLocation(_getSourceReference(), _tokenInputTotal-1, -1L, _tokenInputRow, _tokenInputCol); }
@Override public JsonLocation getTokenLocation() { if (_currToken == JsonToken.FIELD_NAME) { long total = _currInputProcessed + (_nameStartOffset-1); return new JsonLocation(_getSourceReference(), -1L, total, _nameStartRow, _nameStartCol); } return new JsonLocation(_getSourceReference(), -1L, _tokenInputTotal-1, _tokenInputRow, _tokenInputCol); }
/** * Method that returns location of the last processed character; * usually for error reporting purposes */ @Override public JsonLocation getCurrentLocation() { int col = _inputPtr - _currInputRowStart + 1; // 1-based return new JsonLocation(_getSourceReference(), -1L, _currInputProcessed + _inputPtr, // bytes, chars _currInputRow, col); }
@Override public JsonLocation getTokenLocation() { return new JsonLocation(_getSourceReference(), _tokenInputTotal, -1L, _tokenInputRow, _tokenInputCol); }
@Override public JsonLocation getCurrentLocation() { return new JsonLocation(_getSourceReference(), -1L, -1L, _currInputRow, -1); }
@Override public JsonLocation getTokenLocation() { return new JsonLocation(_getSourceReference(), -1L, -1L, _tokenInputRow, -1); }
@Override public JsonLocation getCurrentLocation() { int col = _inputPtr - _currInputRowStart + 1; // 1-based // Since we track CR and LF separately, max should gives us right answer int row = Math.max(_currInputRow, _currInputRowAlt); return new JsonLocation(_getSourceReference(), _currInputProcessed + (_inputPtr - _currBufferStart), -1L, // bytes, chars row, col); }
@Override public JsonLocation getTokenLocation() { return new JsonLocation(_getSourceReference(), _tokenInputTotal, -1L, _tokenInputRow, _tokenInputCol); }
@Override public JsonLocation getTokenLocation() { if (_currToken == JsonToken.FIELD_NAME) { long total = _currInputProcessed + (_nameStartOffset-1); return new JsonLocation(_getSourceReference(), -1L, total, _nameStartRow, _nameStartCol); } return new JsonLocation(_getSourceReference(), -1L, _tokenInputTotal-1, _tokenInputRow, _tokenInputCol); }
@Override public JsonLocation getCurrentLocation() { int col = _inputPtr - _currInputRowStart + 1; // 1-based return new JsonLocation(_getSourceReference(), -1L, _currInputProcessed + _inputPtr, _currInputRow, col); }
@Override public JsonLocation getTokenLocation() { if (_currToken == JsonToken.FIELD_NAME) { long total = _currInputProcessed + (_nameStartOffset-1); return new JsonLocation(_getSourceReference(), total, -1L, _nameStartRow, _nameStartCol); } return new JsonLocation(_getSourceReference(), _tokenInputTotal-1, -1L, _tokenInputRow, _tokenInputCol); }
protected JsonLocation _locationFor(Mark m) { if (m == null) { return new JsonLocation(_ioContext.getSourceReference(), -1, -1, -1); } return new JsonLocation(_ioContext.getSourceReference(), -1, m.getLine() + 1, // from 0- to 1-based m.getColumn() + 1); // ditto }
/** * Method that return the <b>starting</b> location of the current * token; that is, position of the first character from input * that starts the current token. */ @Override public JsonLocation getTokenLocation() { return new JsonLocation(_getSourceReference(), -1L, getTokenCharacterOffset(), // bytes, chars getTokenLineNr(), getTokenColumnNr()); }
@Override public Object createFromObjectWith(DeserializationContext ctxt, Object[] args) { return new JsonLocation(args[0], _long(args[1]), _long(args[2]), _int(args[3]), _int(args[4])); }
/** * Method that return the <b>starting</b> location of the current * token; that is, position of the first character from input * that starts the current token. */ @Override public JsonLocation getTokenLocation() { return new JsonLocation(_getSourceReference(), -1L, getTokenCharacterOffset(), // bytes, chars getTokenLineNr(), getTokenColumnNr()); }