Package com.networknt.jsonoverlay
Class Overlay<V>
- java.lang.Object
-
- com.networknt.jsonoverlay.Overlay<V>
-
public class Overlay<V> extends Object
-
-
Constructor Summary
Constructors Constructor Description Overlay(IJsonOverlay<?> overlay)Overlay(JsonOverlay<V> overlay)Overlay(ListOverlay<V> list, int index)Overlay(MapOverlay<V> map, String key)Overlay(PropertiesOverlay<?> props, String fieldName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonOverlay<?>find(com.fasterxml.jackson.core.JsonPointer path)static JsonOverlay<?>find(JsonOverlay<?> overlay, com.fasterxml.jackson.core.JsonPointer path)JsonOverlay<?>find(String path)static <V,OV extends JsonOverlay<V>>
JsonOverlay<?>find(OV overlay, String path)Vget()static <V> Vget(JsonOverlay<V> overlay)StringgetJsonReference()StringgetJsonReference(boolean forRef)static StringgetJsonReference(JsonOverlay<?> overlay)static StringgetJsonReference(JsonOverlay<?> overlay, boolean forRef)static <X> ListOverlay<X>getListOverlay(Overlay<List<X>> overlay)static <X> MapOverlay<X>getMapOverlay(Overlay<Map<String,X>> overlay)<Model> ModelgetModel()static <Model,V>
ModelgetModel(JsonOverlay<V> overlay)JsonOverlay<V>getOverlay()JsonOverlay<?>getParent()static <V> JsonOverlay<?>getParent(JsonOverlay<V> overlay)PropertiesOverlay<?>getParentPropertiesOverlay()static <V> PropertiesOverlay<?>getParentPropertiesOverlay(JsonOverlay<V> overlay)com.fasterxml.jackson.databind.JsonNodegetParsedJson()static com.fasterxml.jackson.databind.JsonNodegetParsedJson(JsonOverlay<?> overlay)static StringgetPathFromFromRoot(JsonOverlay<?> overlay)StringgetPathFromRoot()StringgetPathInParent()static StringgetPathInParent(JsonOverlay<?> overlay)Optional<PositionInfo>getPositionInfo()static Optional<PositionInfo>getPositionInfo(JsonOverlay<?> overlay)static PropertiesOverlay<?>getPropertiesOverlay(Overlay<PropertiesOverlay<?>> overlay)List<String>getPropertyNames()static <V> List<String>getPropertyNames(JsonOverlay<V> overlay)ReferencegetReference(int index)static <V> ReferencegetReference(JsonOverlay<V> overlay, int index)static <V> ReferencegetReference(JsonOverlay<V> overlay, String key)ReferencegetReference(String key)Overlay<V>getReferenceOverlay()static <V> Overlay<V>getReferenceOverlay(JsonOverlay<V> overlay)JsonOverlay<?>getRoot()static JsonOverlay<?>getRoot(JsonOverlay<?> overlay)Optional<PositionInfo.PositionEndpoint>getStartPosition()static Optional<PositionInfo.PositionEndpoint>getStartPosition(JsonOverlay<?> overlay)booleanisElaborated()static <V> booleanisElaborated(JsonOverlay<V> overlay)booleanisPresent()static <V> booleanisPresent(JsonOverlay<V> overlay)booleanisReference(int index)static <V> booleanisReference(JsonOverlay<V> overlay, int index)static <V> booleanisReference(JsonOverlay<V> overlay, String key)booleanisReference(String key)static <X> Overlay<X>of(IJsonOverlay<?> props, String fieldName, Class<X> type)static <V> Overlay<V>of(IJsonOverlay<V> overlay)static <V> Overlay<V>of(JsonOverlay<V> overlay)static <V> Overlay<List<V>>of(ListOverlay<V> overlay)static <V> Overlay<V>of(ListOverlay<V> list, int index)static <V> Overlay<Map<String,V>>of(MapOverlay<V> overlay)static <V> Overlay<V>of(MapOverlay<V> map, String key)static <X> Overlay<X>of(PropertiesOverlay<?> props, String fieldName, Class<X> type)static <V> Overlay<List<V>>of(List<V> list)static <V> Overlay<V>of(List<V> list, int index)static <V> Overlay<Map<String,V>>of(Map<String,V> map)static <V> Overlay<V>of(Map<String,V> map, String key)com.fasterxml.jackson.databind.JsonNodetoJson()static <V> com.fasterxml.jackson.databind.JsonNodetoJson(JsonOverlay<V> overlay)static <V> com.fasterxml.jackson.databind.JsonNodetoJson(JsonOverlay<V> overlay, SerializationOptions options)static <V> com.fasterxml.jackson.databind.JsonNodetoJson(JsonOverlay<V> overlay, SerializationOptions.Option... options)com.fasterxml.jackson.databind.JsonNodetoJson(SerializationOptions options)com.fasterxml.jackson.databind.JsonNodetoJson(SerializationOptions.Option... options)StringtoString()
-
-
-
Constructor Detail
-
Overlay
public Overlay(JsonOverlay<V> overlay)
-
Overlay
public Overlay(IJsonOverlay<?> overlay)
-
Overlay
public Overlay(MapOverlay<V> map, String key)
-
Overlay
public Overlay(ListOverlay<V> list, int index)
-
Overlay
public Overlay(PropertiesOverlay<?> props, String fieldName)
-
-
Method Detail
-
of
public static <V> Overlay<V> of(JsonOverlay<V> overlay)
-
of
public static <V> Overlay<V> of(IJsonOverlay<V> overlay)
-
of
public static <V> Overlay<Map<String,V>> of(MapOverlay<V> overlay)
-
of
public static <V> Overlay<List<V>> of(ListOverlay<V> overlay)
-
of
public static <V> Overlay<V> of(MapOverlay<V> map, String key)
-
of
public static <V> Overlay<V> of(ListOverlay<V> list, int index)
-
of
public static <X> Overlay<X> of(PropertiesOverlay<?> props, String fieldName, Class<X> type)
-
of
public static <X> Overlay<X> of(IJsonOverlay<?> props, String fieldName, Class<X> type)
-
get
public final V get()
-
get
public static <V> V get(JsonOverlay<V> overlay)
-
getOverlay
public final JsonOverlay<V> getOverlay()
-
getListOverlay
public static <X> ListOverlay<X> getListOverlay(Overlay<List<X>> overlay)
-
getMapOverlay
public static <X> MapOverlay<X> getMapOverlay(Overlay<Map<String,X>> overlay)
-
getPropertiesOverlay
public static PropertiesOverlay<?> getPropertiesOverlay(Overlay<PropertiesOverlay<?>> overlay)
-
find
public JsonOverlay<?> find(com.fasterxml.jackson.core.JsonPointer path)
-
find
public static JsonOverlay<?> find(JsonOverlay<?> overlay, com.fasterxml.jackson.core.JsonPointer path)
-
find
public JsonOverlay<?> find(String path)
-
find
public static <V,OV extends JsonOverlay<V>> JsonOverlay<?> find(OV overlay, String path)
-
toJson
public com.fasterxml.jackson.databind.JsonNode toJson()
-
toJson
public static <V> com.fasterxml.jackson.databind.JsonNode toJson(JsonOverlay<V> overlay)
-
toJson
public com.fasterxml.jackson.databind.JsonNode toJson(SerializationOptions options)
-
toJson
public static <V> com.fasterxml.jackson.databind.JsonNode toJson(JsonOverlay<V> overlay, SerializationOptions options)
-
toJson
public com.fasterxml.jackson.databind.JsonNode toJson(SerializationOptions.Option... options)
-
toJson
public static <V> com.fasterxml.jackson.databind.JsonNode toJson(JsonOverlay<V> overlay, SerializationOptions.Option... options)
-
getParsedJson
public com.fasterxml.jackson.databind.JsonNode getParsedJson()
-
getParsedJson
public static com.fasterxml.jackson.databind.JsonNode getParsedJson(JsonOverlay<?> overlay)
-
isPresent
public boolean isPresent()
-
isPresent
public static <V> boolean isPresent(JsonOverlay<V> overlay)
-
isElaborated
public boolean isElaborated()
-
isElaborated
public static <V> boolean isElaborated(JsonOverlay<V> overlay)
-
getParent
public JsonOverlay<?> getParent()
-
getParent
public static <V> JsonOverlay<?> getParent(JsonOverlay<V> overlay)
-
getParentPropertiesOverlay
public PropertiesOverlay<?> getParentPropertiesOverlay()
-
getParentPropertiesOverlay
public static <V> PropertiesOverlay<?> getParentPropertiesOverlay(JsonOverlay<V> overlay)
-
getPathInParent
public String getPathInParent()
-
getPathInParent
public static String getPathInParent(JsonOverlay<?> overlay)
-
getRoot
public JsonOverlay<?> getRoot()
-
getRoot
public static JsonOverlay<?> getRoot(JsonOverlay<?> overlay)
-
getModel
public <Model> Model getModel()
-
getModel
public static <Model,V> Model getModel(JsonOverlay<V> overlay)
-
getPathFromRoot
public String getPathFromRoot()
-
getPathFromFromRoot
public static String getPathFromFromRoot(JsonOverlay<?> overlay)
-
getJsonReference
public String getJsonReference()
-
getJsonReference
public static String getJsonReference(JsonOverlay<?> overlay)
-
getJsonReference
public String getJsonReference(boolean forRef)
-
getJsonReference
public static String getJsonReference(JsonOverlay<?> overlay, boolean forRef)
-
getPositionInfo
public Optional<PositionInfo> getPositionInfo()
-
getPositionInfo
public static Optional<PositionInfo> getPositionInfo(JsonOverlay<?> overlay)
-
getStartPosition
public Optional<PositionInfo.PositionEndpoint> getStartPosition()
-
getStartPosition
public static Optional<PositionInfo.PositionEndpoint> getStartPosition(JsonOverlay<?> overlay)
-
getPropertyNames
public static <V> List<String> getPropertyNames(JsonOverlay<V> overlay)
-
isReference
public boolean isReference(String key)
-
isReference
public static <V> boolean isReference(JsonOverlay<V> overlay, String key)
-
isReference
public boolean isReference(int index)
-
isReference
public static <V> boolean isReference(JsonOverlay<V> overlay, int index)
-
getReferenceOverlay
public static <V> Overlay<V> getReferenceOverlay(JsonOverlay<V> overlay)
-
getReference
public static <V> Reference getReference(JsonOverlay<V> overlay, String key)
-
getReference
public Reference getReference(int index)
-
getReference
public static <V> Reference getReference(JsonOverlay<V> overlay, int index)
-
-