forked from FasterXML/jackson-databind
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJRefPath.java
More file actions
52 lines (40 loc) · 1.38 KB
/
Copy pathJRefPath.java
File metadata and controls
52 lines (40 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package tools.jackson.databind;
import java.util.Objects;
import tools.jackson.databind.jsontype.TypeDeserializer;
public class JRefPath {
public static final String JREF_REF = "$ref";
private final DeserializationContext ctxt;
private final String path;
private final ValueDeserializer<?> deserializer;
private final TypeDeserializer typeDeserializer;
public JRefPath(String path, DeserializationContext ctxt, ValueDeserializer<?> deserializer,
TypeDeserializer typeDeserializer) {
Objects.requireNonNull(path, "path cannot be null");
this.path = path;
Objects.requireNonNull(ctxt, "ctxt cannot be null");
this.ctxt = ctxt;
Objects.requireNonNull(deserializer, "deserializer cannot be null");
this.deserializer = deserializer;
this.typeDeserializer = typeDeserializer;
}
public JRefPath(String path, DeserializationContext ctxt, ValueDeserializer<?> deserializer) {
this(path, ctxt, deserializer, null);
}
public DeserializationContext getContext() {
return this.ctxt;
}
public String getPath() {
return this.path;
}
public ValueDeserializer<?> getValueDeserializer() {
return deserializer;
}
public TypeDeserializer getTypeDeserializer() {
return typeDeserializer;
}
@Override
public String toString() {
return "JRefPath[ctxt=" + ctxt + ", path=" + path + ", deserializer=" + deserializer + ", typeDeserializer="
+ typeDeserializer + "]";
}
}