private void handleCheckedStateTransition(final int requiredState, final String elementToAdd, final String valueToAdd) { final StackElement stackElement = (StackElement)stack.peek(); if ((expectedStates & requiredState) == 0) { throw new IllegalWriterStateException(stackElement.status, requiredState, elementToAdd); } int currentState = handleStateTransition(stackElement.status, requiredState, elementToAdd, valueToAdd); stackElement.status = currentState; }
case STATE_ROOT: if (requiredState == STATE_START_OBJECT) { currentState = handleStateTransition(STATE_START_ELEMENTS, STATE_START_OBJECT, elementToAdd, null); return requiredState; switch(requiredState) { case STATE_START_OBJECT: currentState = handleStateTransition(currentState, STATE_NEXT_ELEMENT, null, null); currentState = handleStateTransition(currentState, STATE_START_OBJECT, elementToAdd, null); return requiredState; case STATE_NEXT_ELEMENT: case STATE_NEXT_ELEMENT: if (!isArrayElement || (mode & EXPLICIT_MODE) != 0) { currentState = handleStateTransition(currentState, STATE_START_ATTRIBUTES, null, null); currentState = handleStateTransition(currentState, STATE_END_ATTRIBUTES, null, null); currentState = handleStateTransition(currentState, STATE_SET_VALUE, null, valueToAdd); break; case STATE_START_OBJECT: currentState = handleStateTransition(currentState, STATE_START_OBJECT, elementToAdd, null); break; case STATE_ROOT: case STATE_NEXT_ELEMENT: currentState = handleStateTransition(currentState, STATE_SET_VALUE, null, null); currentState = handleStateTransition(currentState, requiredState, null, null); break; case STATE_NEXT_ATTRIBUTE:
private void handleCheckedStateTransition(final int requiredState, final String elementToAdd, final String valueToAdd) { final StackElement stackElement = (StackElement)stack.peek(); if ((expectedStates & requiredState) == 0) { throw new IllegalWriterStateException(stackElement.status, requiredState, elementToAdd); } int currentState = handleStateTransition(stackElement.status, requiredState, elementToAdd, valueToAdd); stackElement.status = currentState; }
private void handleCheckedStateTransition(final int requiredState, final String elementToAdd, final String valueToAdd) { final StackElement stackElement = stack.peek(); if ((expectedStates & requiredState) == 0) { throw new IllegalWriterStateException(stackElement.status, requiredState, elementToAdd); } final int currentState = handleStateTransition(stackElement.status, requiredState, elementToAdd, valueToAdd); stackElement.status = currentState; }
private void handleCheckedStateTransition(final int requiredState, final String elementToAdd, final String valueToAdd) { final StackElement stackElement = (StackElement)stack.peek(); if ((expectedStates & requiredState) == 0) { throw new IllegalWriterStateException(stackElement.status, requiredState, elementToAdd); } int currentState = handleStateTransition(stackElement.status, requiredState, elementToAdd, valueToAdd); stackElement.status = currentState; }
private void handleCheckedStateTransition(final int requiredState, final String elementToAdd, final String valueToAdd) { final StackElement stackElement = (StackElement)stack.peek(); if ((expectedStates & requiredState) == 0) { throw new IllegalWriterStateException(stackElement.status, requiredState, elementToAdd); } int currentState = handleStateTransition(stackElement.status, requiredState, elementToAdd, valueToAdd); stackElement.status = currentState; }
private void handleCheckedStateTransition(final int requiredState, final String elementToAdd, final String valueToAdd) { final StackElement stackElement = (StackElement)stack.peek(); if ((expectedStates & requiredState) == 0) { throw new IllegalWriterStateException(stackElement.status, requiredState, elementToAdd); } int currentState = handleStateTransition(stackElement.status, requiredState, elementToAdd, valueToAdd); stackElement.status = currentState; }
private void handleCheckedStateTransition(final int requiredState, final String elementToAdd, final String valueToAdd) { final StackElement stackElement = (StackElement)stack.peek(); if ((expectedStates & requiredState) == 0) { throw new IllegalWriterStateException(stackElement.status, requiredState, elementToAdd); } int currentState = handleStateTransition(stackElement.status, requiredState, elementToAdd, valueToAdd); stackElement.status = currentState; }
case STATE_ROOT: if (requiredState == STATE_START_OBJECT) { currentState = handleStateTransition(STATE_START_ELEMENTS, STATE_START_OBJECT, elementToAdd, null); return requiredState; switch(requiredState) { case STATE_START_OBJECT: currentState = handleStateTransition(currentState, STATE_NEXT_ELEMENT, null, null); currentState = handleStateTransition(currentState, STATE_START_OBJECT, elementToAdd, null); return requiredState; case STATE_NEXT_ELEMENT: case STATE_NEXT_ELEMENT: if (!isArrayElement || (mode & EXPLICIT_MODE) != 0) { currentState = handleStateTransition(currentState, STATE_START_ATTRIBUTES, null, null); currentState = handleStateTransition(currentState, STATE_END_ATTRIBUTES, null, null); currentState = handleStateTransition(currentState, STATE_SET_VALUE, null, valueToAdd); break; case STATE_START_OBJECT: currentState = handleStateTransition(currentState, STATE_START_OBJECT, elementToAdd, null); break; case STATE_ROOT: case STATE_NEXT_ELEMENT: currentState = handleStateTransition(currentState, STATE_SET_VALUE, null, null); currentState = handleStateTransition(currentState, requiredState, null, null); break; case STATE_NEXT_ATTRIBUTE:
case STATE_ROOT: if (requiredState == STATE_START_OBJECT) { currentState = handleStateTransition(STATE_START_ELEMENTS, STATE_START_OBJECT, elementToAdd, null); return requiredState; switch(requiredState) { case STATE_START_OBJECT: currentState = handleStateTransition(currentState, STATE_NEXT_ELEMENT, null, null); currentState = handleStateTransition(currentState, STATE_START_OBJECT, elementToAdd, null); return requiredState; case STATE_NEXT_ELEMENT: case STATE_NEXT_ELEMENT: if (!isArrayElement || (mode & EXPLICIT_MODE) != 0) { currentState = handleStateTransition(currentState, STATE_START_ATTRIBUTES, null, null); currentState = handleStateTransition(currentState, STATE_END_ATTRIBUTES, null, null); currentState = handleStateTransition(currentState, STATE_SET_VALUE, null, valueToAdd); break; case STATE_START_OBJECT: currentState = handleStateTransition(currentState, STATE_START_OBJECT, elementToAdd, null); break; case STATE_ROOT: case STATE_NEXT_ELEMENT: currentState = handleStateTransition(currentState, STATE_SET_VALUE, null, null); currentState = handleStateTransition(currentState, requiredState, null, null); break; case STATE_NEXT_ATTRIBUTE:
case STATE_ROOT: if (requiredState == STATE_START_OBJECT) { currentState = handleStateTransition(STATE_START_ELEMENTS, STATE_START_OBJECT, elementToAdd, null); return requiredState; switch(requiredState) { case STATE_START_OBJECT: currentState = handleStateTransition(currentState, STATE_NEXT_ELEMENT, null, null); currentState = handleStateTransition(currentState, STATE_START_OBJECT, elementToAdd, null); return requiredState; case STATE_NEXT_ELEMENT: case STATE_NEXT_ELEMENT: if (!isArrayElement || (mode & EXPLICIT_MODE) != 0) { currentState = handleStateTransition(currentState, STATE_START_ATTRIBUTES, null, null); currentState = handleStateTransition(currentState, STATE_END_ATTRIBUTES, null, null); currentState = handleStateTransition(currentState, STATE_SET_VALUE, null, valueToAdd); break; case STATE_START_OBJECT: currentState = handleStateTransition(currentState, STATE_START_OBJECT, elementToAdd, null); break; case STATE_ROOT: case STATE_NEXT_ELEMENT: currentState = handleStateTransition(currentState, STATE_SET_VALUE, null, null); currentState = handleStateTransition(currentState, requiredState, null, null); break; case STATE_NEXT_ATTRIBUTE:
case STATE_ROOT: if (requiredState == STATE_START_OBJECT) { currentState = handleStateTransition(STATE_START_ELEMENTS, STATE_START_OBJECT, elementToAdd, null); return requiredState; switch (requiredState) { case STATE_START_OBJECT: currentState = handleStateTransition(currentState, STATE_NEXT_ELEMENT, null, null); currentState = handleStateTransition(currentState, STATE_START_OBJECT, elementToAdd, null); return requiredState; case STATE_NEXT_ELEMENT: case STATE_NEXT_ELEMENT: if (!isArrayElement || (mode & EXPLICIT_MODE) != 0) { currentState = handleStateTransition(currentState, STATE_START_ATTRIBUTES, null, null); currentState = handleStateTransition(currentState, STATE_END_ATTRIBUTES, null, null); currentState = handleStateTransition(currentState, STATE_SET_VALUE, null, valueToAdd); break; case STATE_START_OBJECT: currentState = handleStateTransition(currentState, STATE_START_OBJECT, elementToAdd, null); break; case STATE_ROOT: case STATE_NEXT_ELEMENT: currentState = handleStateTransition(currentState, STATE_SET_VALUE, null, null); currentState = handleStateTransition(currentState, requiredState, null, null); break; case STATE_NEXT_ATTRIBUTE:
case STATE_ROOT: if (requiredState == STATE_START_OBJECT) { currentState = handleStateTransition(STATE_START_ELEMENTS, STATE_START_OBJECT, elementToAdd, null); return requiredState; switch(requiredState) { case STATE_START_OBJECT: currentState = handleStateTransition(currentState, STATE_NEXT_ELEMENT, null, null); currentState = handleStateTransition(currentState, STATE_START_OBJECT, elementToAdd, null); return requiredState; case STATE_NEXT_ELEMENT: case STATE_NEXT_ELEMENT: if (!isArrayElement || (mode & EXPLICIT_MODE) != 0) { currentState = handleStateTransition(currentState, STATE_START_ATTRIBUTES, null, null); currentState = handleStateTransition(currentState, STATE_END_ATTRIBUTES, null, null); currentState = handleStateTransition(currentState, STATE_SET_VALUE, null, valueToAdd); break; case STATE_START_OBJECT: currentState = handleStateTransition(currentState, STATE_START_OBJECT, elementToAdd, null); break; case STATE_ROOT: case STATE_NEXT_ELEMENT: currentState = handleStateTransition(currentState, STATE_SET_VALUE, null, null); currentState = handleStateTransition(currentState, requiredState, null, null); break; case STATE_NEXT_ATTRIBUTE:
case STATE_ROOT: if (requiredState == STATE_START_OBJECT) { currentState = handleStateTransition(STATE_START_ELEMENTS, STATE_START_OBJECT, elementToAdd, null); return requiredState; switch(requiredState) { case STATE_START_OBJECT: currentState = handleStateTransition(currentState, STATE_NEXT_ELEMENT, null, null); currentState = handleStateTransition(currentState, STATE_START_OBJECT, elementToAdd, null); return requiredState; case STATE_NEXT_ELEMENT: case STATE_NEXT_ELEMENT: if (!isArrayElement || (mode & EXPLICIT_MODE) != 0) { currentState = handleStateTransition(currentState, STATE_START_ATTRIBUTES, null, null); currentState = handleStateTransition(currentState, STATE_END_ATTRIBUTES, null, null); currentState = handleStateTransition(currentState, STATE_SET_VALUE, null, valueToAdd); break; case STATE_START_OBJECT: currentState = handleStateTransition(currentState, STATE_START_OBJECT, elementToAdd, null); break; case STATE_ROOT: case STATE_NEXT_ELEMENT: currentState = handleStateTransition(currentState, STATE_SET_VALUE, null, null); currentState = handleStateTransition(currentState, requiredState, null, null); break; case STATE_NEXT_ATTRIBUTE: