com.fasterxml.jackson.databind
Class JsonMappingException.Reference

java.lang.Object
  extended by com.fasterxml.jackson.databind.JsonMappingException.Reference
All Implemented Interfaces:
Serializable
Enclosing class:
JsonMappingException

public static class JsonMappingException.Reference
extends Object
implements Serializable

Simple 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
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 Collection instance that contained the reference; used if index is relevant and available.
 
Constructor Summary
protected JsonMappingException.Reference()
          Default constructor for deserialization/sub-classing purposes
  JsonMappingException.Reference(Object from)
           
  JsonMappingException.Reference(Object from, int index)
           
  JsonMappingException.Reference(Object from, String fieldName)
           
 
Method Summary
 String getFieldName()
           
 Object getFrom()
           
 int getIndex()
           
 void setFieldName(String n)
           
 void setFrom(Object o)
           
 void setIndex(int ix)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_from

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).


_fieldName

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 _index defined), or when resolving Map classes without (yet) having an instance to operate on.


_index

protected int _index
Index within a Collection instance 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

JsonMappingException.Reference

protected JsonMappingException.Reference()
Default constructor for deserialization/sub-classing purposes


JsonMappingException.Reference

public JsonMappingException.Reference(Object from)

JsonMappingException.Reference

public JsonMappingException.Reference(Object from,
                                      String fieldName)

JsonMappingException.Reference

public JsonMappingException.Reference(Object from,
                                      int index)
Method Detail

setFrom

public void setFrom(Object o)

setFieldName

public void setFieldName(String n)

setIndex

public void setIndex(int ix)

getFrom

public Object getFrom()

getFieldName

public String getFieldName()

getIndex

public int getIndex()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 FasterXML. All Rights Reserved.