diff --git a/core/src/main/kotlin/net/corda/core/cordapp/Cordapp.kt b/core/src/main/kotlin/net/corda/core/cordapp/Cordapp.kt index 3729da353d..1344d91660 100644 --- a/core/src/main/kotlin/net/corda/core/cordapp/Cordapp.kt +++ b/core/src/main/kotlin/net/corda/core/cordapp/Cordapp.kt @@ -23,7 +23,6 @@ import java.net.URL * @property schedulableFlows List of flows startable by the scheduler * @property services List of RPC services * @property serializationWhitelists List of Corda plugin registries - * @property serializationCustomSerializerProxies List of Proxy classes used by the custom serializers * @property serializationCustomSerializers List of serializers * @property customSchemas List of custom schemas * @property jarPath The path to the JAR for this CorDapp diff --git a/docs/source/cordapp-custom-serializers.rst b/docs/source/cordapp-custom-serializers.rst index 9a232c5831..daa4c4cbd6 100644 --- a/docs/source/cordapp-custom-serializers.rst +++ b/docs/source/cordapp-custom-serializers.rst @@ -6,7 +6,7 @@ Pluggable Serializers for CorDapps To be serializable by Corda Java classes must be compiled with the -parameters switch to enable matching of it's properties to constructor parameters. This is important because Corda's internal AMQP serialization scheme will only construct objects using their constructors. However, when recompilation isn't possible, or classes are built in such a way that -they cannot be easily modified for simple serailization, CorDapps can provide custom proxy serializers that Corda +they cannot be easily modified for simple serialization, CorDapps can provide custom proxy serializers that Corda can use to move from types it cannot serialize to an interim representation that it can with the transformation to and from this proxy object being handled by the supplied serializer. @@ -20,7 +20,7 @@ Serializers must * Inherit from net.corda.core.serialization.SerializationCustomSerializer * Be annotated with the @CordaCustomSerializer annotation * Provide a proxy class to transform the object to and from - * Have that proxy class annotated with the @CordaCustomSerializerProxy annotation + * Implmenet the ``toProxy`` and ``fromProxy`` methods Serializers inheriting from SerializationCustomSerializer have to implement two methods and two types @@ -47,7 +47,7 @@ Consider this example class } Without a custom serializer we cannot serialize this class as there is no public constructor that facilitates the -initialisation of all of its's properties. +initialisation of all of it's properties. To be serializable by Corda this would require a custom serializer as follows @@ -55,7 +55,6 @@ To be serializable by Corda this would require a custom serializer as follows @CordaCustomSerializer class ExampleSerializer : SerializationCustomSerializer { - @CordaCustomSerializerProxy data class Proxy(val a: Int, val b: Int) override fun toProxy(obj: Example) = Proxy(obj.a, obj.b)