Package org.codehaus.jackson.map
Class JsonMappingException.Reference
- java.lang.Object
-
- org.codehaus.jackson.map.JsonMappingException.Reference
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- JsonMappingException
public static class JsonMappingException.Reference extends java.lang.Object implements java.io.SerializableSimple bean class used to contain references. References can be added to indicate execution/reference path that lead to the problem that caused this exception to be thrown.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String_fieldNameName of field (for beans) or key (for Maps) that is part of the reference.protected java.lang.Object_fromObject through which reference was resolved.protected int_indexIndex within aCollectioninstance that contained the reference; used if index is relevant and available.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetFieldName()java.lang.ObjectgetFrom()intgetIndex()voidsetFieldName(java.lang.String n)voidsetFrom(java.lang.Object o)voidsetIndex(int ix)java.lang.StringtoString()
-
-
-
Field Detail
-
_from
protected java.lang.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).
-
_fieldName
protected java.lang.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_indexdefined), or when resolving Map classes without (yet) having an instance to operate on.
-
_index
protected int _index
Index within aCollectioninstance that contained the reference; used if index is relevant and available. If either not applicable, or not available, -1 is used to denote "not known".
-
-
Constructor Detail
-
Reference
protected Reference()
Default constructor for deserialization/sub-classing purposes
-
Reference
public Reference(java.lang.Object from)
-
Reference
public Reference(java.lang.Object from, java.lang.String fieldName)
-
Reference
public Reference(java.lang.Object from, int index)
-
-
Method Detail
-
setFrom
public void setFrom(java.lang.Object o)
-
setFieldName
public void setFieldName(java.lang.String n)
-
setIndex
public void setIndex(int ix)
-
getFrom
public java.lang.Object getFrom()
-
getFieldName
public java.lang.String getFieldName()
-
getIndex
public int getIndex()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-