1 package com.fasterxml.jackson.databind.deser;
2 
3 import com.fasterxml.jackson.core.JsonLocation;
4 import com.fasterxml.jackson.databind.util.ClassUtil;
5 
6 /**
7  * Helper class for {@link UnresolvedForwardReference}, to contain information about unresolved ids.
8  *
9  * @author pgelinas
10  */
11 public class UnresolvedId {
12     private final Object _id;
13     private final JsonLocation _location;
14     private final Class<?> _type;
15 
UnresolvedId(Object id, Class<?> type, JsonLocation where)16     public UnresolvedId(Object id, Class<?> type, JsonLocation where) {
17         _id = id;
18         _type = type;
19         _location = where;
20     }
21 
22     /**
23      * The id which is unresolved.
24      */
getId()25     public Object getId() { return _id; }
26 
27     /**
28      * The type of object which was expected.
29      */
getType()30     public Class<?> getType() { return _type; }
getLocation()31     public JsonLocation getLocation() { return _location; }
32 
33     @Override
toString()34     public String toString() {
35         return String.format("Object id [%s] (for %s) at %s", _id,
36                 ClassUtil.nameOf(_type), _location);
37     }
38 }
39