com.fasterxml.jackson.databind.JsonMappingException
(and, in fact, much of implementation came from that class, but
had to be cut-n-pasted since we do not depend on databind package).
| Modifier and Type | Class and Description |
|---|---|
| public static class | JSONObjectException.
Simple bean class used to contain references. |
| Modifier and Type | Field and Description |
|---|---|
| protected LinkedList | _path
Path through which problem that triggering throwing of this exception was reached. |
| pack-priv static final int | MAX_REFS_TO_LIST
Let's limit length of reference chain, to limit damage in cases of infinite recursion. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected String | |
| public static JSONObjectException | |
| public static JSONObjectException | |
| public static JSONObjectException | |
| public static JSONObjectException | fromUnexpectedIOE(IOException src)
Factory method used when "upgrading" an |
| public String | getLocalizedMessage()
Overrides java. Creates a localized description of this throwable. |
| public String | getMessage()
Overrides com. Method is overridden so that we can properly inject description of problem path, if such is defined. |
| public List | getPath()
Method for accessing full structural path within type hierarchy down to problematic property. |
| public String | getPathReference()
Method for accesing description of path that lead to the problem that triggered this exception |
| public StringBuilder | |
| public void | prependPath(Object referrer, String fieldName)
Method called to prepend a reference information in front of current path |
| public void | prependPath(Object referrer, int index)
Method called to prepend a reference information in front of current path |
| public void | |
| public String | toString()
Overrides com. Returns a short description of this throwable. |
| public static JSONObjectException | wrapWithPath(Throwable src, Object refFrom, String refFieldName)
Method that can be called to either create a new JsonMappingException (if underlying exception is not a JsonMappingException), or augment given exception with given path/reference information. |
| public static JSONObjectException | wrapWithPath(Throwable src, Object refFrom, int index)
Method that can be called to either create a new JsonMappingException (if underlying exception is not a JsonMappingException), or augment given exception with given path/reference information. |
| public static JSONObjectException | wrapWithPath(Throwable src, JSONObjectException.
Method that can be called to either create a new JsonMappingException (if underlying exception is not a JsonMappingException), or augment given exception with given path/reference information. |
| _path | back to summary |
|---|---|
| protected LinkedList<JSONObjectException. Path through which problem that triggering throwing of this exception was reached. | |
| MAX_REFS_TO_LIST | back to summary |
|---|---|
| pack-priv static final int MAX_REFS_TO_LIST Let's limit length of reference chain, to limit damage in cases of infinite recursion. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| JSONObjectException | back to summary |
|---|---|
| public JSONObjectException(String msg) | |
| JSONObjectException | back to summary |
|---|---|
| public JSONObjectException(String msg, Throwable rootCause) | |
| JSONObjectException | back to summary |
|---|---|
| public JSONObjectException(String msg, JsonLocation loc) | |
| JSONObjectException | back to summary |
|---|---|
| public JSONObjectException(String msg, JsonLocation loc, Throwable rootCause) | |
| _appendPathDesc | back to summary |
|---|---|
| protected void _appendPathDesc(StringBuilder sb) | |
| _buildMessage | back to summary |
|---|---|
| protected String _buildMessage() | |
| from | back to summary |
|---|---|
| public static JSONObjectException from(JsonParser p, String msg) | |
| from | back to summary |
|---|---|
| public static JSONObjectException from(JsonParser p, String msg, Object... args) | |
| from | back to summary |
|---|---|
| public static JSONObjectException from(JsonParser p, Throwable problem, String msg, Object... args) | |
| fromUnexpectedIOE | back to summary |
|---|---|
| public static JSONObjectException fromUnexpectedIOE(IOException src) Factory method used when "upgrading" an | |
| getLocalizedMessage | back to summary |
|---|---|
| public String getLocalizedMessage() Overrides java. Doc from java. Creates a localized description of this throwable.
Subclasses may override this method in order to produce a
locale-specific message. For subclasses that do not override this
method, the default implementation returns the same result as
| |
| getMessage | back to summary |
|---|---|
| public String getMessage() Overrides com. Method is overridden so that we can properly inject description of problem path, if such is defined.
| |
| getPath | back to summary |
|---|---|
| public List Method for accessing full structural path within type hierarchy down to problematic property. | |
| getPathReference | back to summary |
|---|---|
| public String getPathReference() Method for accesing description of path that lead to the problem that triggered this exception | |
| getPathReference | back to summary |
|---|---|
| public StringBuilder getPathReference(StringBuilder sb) | |
| prependPath | back to summary |
|---|---|
| public void prependPath(Object referrer, String fieldName) Method called to prepend a reference information in front of current path | |
| prependPath | back to summary |
|---|---|
| public void prependPath(Object referrer, int index) Method called to prepend a reference information in front of current path | |
| prependPath | back to summary |
|---|---|
| public void prependPath(JSONObjectException. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides com. Doc from java. Returns a short description of this throwable. The result is the concatenation of:
getLocalizedMessage returns null, then just
the class name is returned.
| |
| wrapWithPath | back to summary |
|---|---|
| public static JSONObjectException wrapWithPath(Throwable src, Object refFrom, String refFieldName) Method that can be called to either create a new JsonMappingException (if underlying exception is not a JsonMappingException), or augment given exception with given path/reference information. This version of method is called when the reference is through a non-indexed object, such as a Map or POJO/bean. | |
| wrapWithPath | back to summary |
|---|---|
| public static JSONObjectException wrapWithPath(Throwable src, Object refFrom, int index) Method that can be called to either create a new JsonMappingException (if underlying exception is not a JsonMappingException), or augment given exception with given path/reference information. This version of method is called when the reference is through an index, which happens with arrays and Collections. | |
| wrapWithPath | back to summary |
|---|---|
| public static JSONObjectException wrapWithPath(Throwable src, JSONObjectException. Method that can be called to either create a new JsonMappingException (if underlying exception is not a JsonMappingException), or augment given exception with given path/reference information. | |
| Modifier and Type | Field and Description |
|---|---|
| protected String | _fieldName
Name of field (for beans) or key (for Maps) that is part of the reference. |
| protected Object | _from
Object through which reference was resolved. |
| protected int | _index
Index within a |
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public Object | |
| public int | |
| public void | |
| public void | |
| public void | |
| public String |
| _fieldName | back to summary |
|---|---|
| protected String _fieldName Name of field (for beans) or key (for Maps) that is part
of the reference. May be null for Collection types (which
generally have | |
| _from | back to summary |
|---|---|
| protected Object _from Object through which reference was resolved. Can be either actual instance (usually the case for serialization), or Class (usually the case for deserialization). | |
| _index | back to summary |
|---|---|
| protected int _index Index within a | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| Reference | back to summary |
|---|---|
| protected Reference() Default constructor for deserialization/sub-classing purposes | |
| Reference | back to summary |
|---|---|
| public Reference(Object from) | |
| Reference | back to summary |
|---|---|
| public Reference(Object from, String fieldName) | |
| Reference | back to summary |
|---|---|
| public Reference(Object from, int index) | |
| getFieldName | back to summary |
|---|---|
| public String getFieldName() | |
| getFrom | back to summary |
|---|---|
| public Object getFrom() | |
| getIndex | back to summary |
|---|---|
| public int getIndex() | |
| setFieldName | back to summary |
|---|---|
| public void setFieldName(String n) | |
| setFrom | back to summary |
|---|---|
| public void setFrom(Object o) | |
| setIndex | back to summary |
|---|---|
| public void setIndex(int ix) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |