mirror of
https://github.com/corda/corda.git
synced 2025-01-30 16:14:39 +00:00
Tell ProGuard to remove FlowLogic and ProgressTracker classes.
This commit is contained in:
parent
0a9f4c68ae
commit
b9ecc5243f
@ -3,6 +3,7 @@ package net.corda.core.flows
|
|||||||
import co.paralleluniverse.fibers.Suspendable
|
import co.paralleluniverse.fibers.Suspendable
|
||||||
import co.paralleluniverse.strands.Strand
|
import co.paralleluniverse.strands.Strand
|
||||||
import net.corda.core.CordaInternal
|
import net.corda.core.CordaInternal
|
||||||
|
import net.corda.core.DeleteForDJVM
|
||||||
import net.corda.core.contracts.StateRef
|
import net.corda.core.contracts.StateRef
|
||||||
import net.corda.core.crypto.SecureHash
|
import net.corda.core.crypto.SecureHash
|
||||||
import net.corda.core.identity.Party
|
import net.corda.core.identity.Party
|
||||||
@ -56,10 +57,12 @@ import java.util.*
|
|||||||
* relevant database transactions*. Only set this option to true if you know what you're doing.
|
* relevant database transactions*. Only set this option to true if you know what you're doing.
|
||||||
*/
|
*/
|
||||||
@Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith")
|
@Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith")
|
||||||
|
@DeleteForDJVM
|
||||||
abstract class FlowLogic<out T> {
|
abstract class FlowLogic<out T> {
|
||||||
/** This is where you should log things to. */
|
/** This is where you should log things to. */
|
||||||
val logger: Logger get() = stateMachine.logger
|
val logger: Logger get() = stateMachine.logger
|
||||||
|
|
||||||
|
@DeleteForDJVM
|
||||||
companion object {
|
companion object {
|
||||||
/**
|
/**
|
||||||
* Return the outermost [FlowLogic] instance, or null if not in a flow.
|
* Return the outermost [FlowLogic] instance, or null if not in a flow.
|
||||||
|
@ -130,6 +130,11 @@ private constructor(
|
|||||||
Verifier(createLtxForVerification(), transactionClassLoader, inputStatesContractClassNameToMaxVersion)
|
Verifier(createLtxForVerification(), transactionClassLoader, inputStatesContractClassNameToMaxVersion)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@StubOutForDJVM
|
||||||
|
private fun getParamsFromFlowLogic(): NetworkParameters? {
|
||||||
|
return FlowLogic.currentTopLevel?.serviceHub?.networkParameters
|
||||||
|
}
|
||||||
|
|
||||||
private fun createLtxForVerification(): LedgerTransaction {
|
private fun createLtxForVerification(): LedgerTransaction {
|
||||||
val serializedInputs = this.serializedInputs
|
val serializedInputs = this.serializedInputs
|
||||||
val serializedReferences = this.serializedReferences
|
val serializedReferences = this.serializedReferences
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.corda.core.utilities
|
package net.corda.core.utilities
|
||||||
|
|
||||||
|
import net.corda.core.DeleteForDJVM
|
||||||
import net.corda.core.internal.STRUCTURAL_STEP_PREFIX
|
import net.corda.core.internal.STRUCTURAL_STEP_PREFIX
|
||||||
import net.corda.core.serialization.CordaSerializable
|
import net.corda.core.serialization.CordaSerializable
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
@ -31,9 +32,11 @@ import java.util.*
|
|||||||
* using the [Observable] subscribeOn call.
|
* using the [Observable] subscribeOn call.
|
||||||
*/
|
*/
|
||||||
@CordaSerializable
|
@CordaSerializable
|
||||||
|
@DeleteForDJVM
|
||||||
class ProgressTracker(vararg inputSteps: Step) {
|
class ProgressTracker(vararg inputSteps: Step) {
|
||||||
|
|
||||||
@CordaSerializable
|
@CordaSerializable
|
||||||
|
@DeleteForDJVM
|
||||||
sealed class Change(val progressTracker: ProgressTracker) {
|
sealed class Change(val progressTracker: ProgressTracker) {
|
||||||
data class Position(val tracker: ProgressTracker, val newStep: Step) : Change(tracker) {
|
data class Position(val tracker: ProgressTracker, val newStep: Step) : Change(tracker) {
|
||||||
override fun toString() = newStep.label
|
override fun toString() = newStep.label
|
||||||
@ -62,14 +65,17 @@ class ProgressTracker(vararg inputSteps: Step) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sentinel objects. Overrides equals() to survive process restarts and serialization.
|
// Sentinel objects. Overrides equals() to survive process restarts and serialization.
|
||||||
|
@DeleteForDJVM
|
||||||
object UNSTARTED : Step("Unstarted") {
|
object UNSTARTED : Step("Unstarted") {
|
||||||
override fun equals(other: Any?) = other === UNSTARTED
|
override fun equals(other: Any?) = other === UNSTARTED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DeleteForDJVM
|
||||||
object STARTING : Step("Starting") {
|
object STARTING : Step("Starting") {
|
||||||
override fun equals(other: Any?) = other === STARTING
|
override fun equals(other: Any?) = other === STARTING
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DeleteForDJVM
|
||||||
object DONE : Step("Done") {
|
object DONE : Step("Done") {
|
||||||
override fun equals(other: Any?) = other === DONE
|
override fun equals(other: Any?) = other === DONE
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user