CORDA-786 - Use reflection to infer proxy and proxied types in CorDapp custom serializers

This removes any need for the user implement and override types from the
super class

    * CORDA-786 - Docs update
    * CORDA-786 - Remove unneeded second annotation on the proxy objects
    * Fix merge conflicts
This commit is contained in:
Katelyn Baker
2017-12-04 13:10:02 +00:00
parent d25b7f560c
commit fcec60e232
18 changed files with 80 additions and 110 deletions

View File

@ -181,7 +181,6 @@ class CordappLoader private constructor(private val cordappJarPaths: List<Restri
schedulableFlows = listOf(),
services = listOf(),
serializationWhitelists = listOf(),
serializationCustomSerializerProxies = listOf(),
serializationCustomSerializers = listOf(),
customSchemas = setOf(),
jarPath = ContractUpgradeFlow.javaClass.protectionDomain.codeSource.location // Core JAR location
@ -198,7 +197,6 @@ class CordappLoader private constructor(private val cordappJarPaths: List<Restri
findSchedulableFlows(scanResult),
findServices(scanResult),
findPlugins(it),
findSerialiserProxies(scanResult),
findSerialzers(scanResult),
findCustomSchemas(scanResult),
it.url)
@ -250,10 +248,6 @@ class CordappLoader private constructor(private val cordappJarPaths: List<Restri
} + DefaultWhitelist // Always add the DefaultWhitelist to the whitelist for an app.
}
private fun findSerialiserProxies(scanResult: RestrictedScanResult) : List<Class<*>> {
return scanResult.getClassesWithAnnotation(Class::class, CordaCustomSerializerProxy::class)
}
private fun findSerialzers(scanResult: RestrictedScanResult) : List<Class<out SerializationCustomSerializer<*, *>>> {
return scanResult.getClassesWithAnnotation(SerializationCustomSerializer::class, CordaCustomSerializer::class)
}