com.github.fge.jsonpatch.operation
Class DualPathOperation

java.lang.Object
  extended by com.github.fge.jsonpatch.operation.DualPathOperation
All Implemented Interfaces:
JsonSerializable, JsonPatchOperation
Direct Known Subclasses:
CopyOperation, MoveOperation

public abstract class DualPathOperation
extends Object
implements JsonPatchOperation

Base class for JSON Patch operations taking two JSON Pointers as arguments


Field Summary
protected static MessageBundle BUNDLE
           
protected  JsonPointer from
           
protected  String op
           
protected  JsonPointer path
           
 
Constructor Summary
protected DualPathOperation(String op, JsonPointer from, JsonPointer path)
          Protected constructor
 
Method Summary
 void serialize(JsonGenerator jgen, SerializerProvider provider)
           
 void serializeWithType(JsonGenerator jgen, SerializerProvider provider, TypeSerializer typeSer)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.github.fge.jsonpatch.operation.JsonPatchOperation
apply
 

Field Detail

BUNDLE

protected static final MessageBundle BUNDLE

op

protected final String op

from

protected final JsonPointer from

path

protected final JsonPointer path
Constructor Detail

DualPathOperation

protected DualPathOperation(String op,
                            JsonPointer from,
                            JsonPointer path)
Protected constructor

Parameters:
op - operation name
from - source path
path - destination path
Method Detail

serialize

public final void serialize(JsonGenerator jgen,
                            SerializerProvider provider)
                     throws IOException,
                            JsonProcessingException
Specified by:
serialize in interface JsonSerializable
Throws:
IOException
JsonProcessingException

serializeWithType

public final void serializeWithType(JsonGenerator jgen,
                                    SerializerProvider provider,
                                    TypeSerializer typeSer)
                             throws IOException,
                                    JsonProcessingException
Specified by:
serializeWithType in interface JsonSerializable
Throws:
IOException
JsonProcessingException

toString

public final String toString()
Specified by:
toString in interface JsonPatchOperation
Overrides:
toString in class Object