CORDA-1178 - Api scanner backport and update of api-current.txt (#2813)

* Api scanner backport and update of api-current.txt

* Updated api-current based on current state of release branch

* Update to most recent version of api scanner

* Fix a couple of issues with the merge and regenerate the api file with the most recent version of the scanner.

* Update changelog/release notes
This commit is contained in:
Anthony Keenan 2018-03-21 11:19:20 +00:00 committed by Katelyn Baker
parent 33b34a306f
commit 3a14ae89c0
102 changed files with 2556 additions and 113 deletions

View File

@ -14,8 +14,6 @@
public void setMessage(String)
public void setOriginalExceptionClassName(String)
##
public @interface net.corda.core.CordaInternal
##
public final class net.corda.core.CordaOID extends java.lang.Object
@org.jetbrains.annotations.NotNull public static final String CORDA_PLATFORM = "1.3.6.1.4.1.50530.1"
public static final net.corda.core.CordaOID INSTANCE
@ -209,7 +207,7 @@ public static final class net.corda.core.context.Trace$InvocationId$Companion ex
public static final class net.corda.core.context.Trace$SessionId$Companion extends java.lang.Object
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public final net.corda.core.context.Trace$SessionId newInstance(String, java.time.Instant)
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.contracts.AlwaysAcceptAttachmentConstraint extends java.lang.Object implements net.corda.core.contracts.AttachmentConstraint
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.contracts.AlwaysAcceptAttachmentConstraint extends java.lang.Object implements net.corda.core.contracts.AttachmentConstraint
public boolean isSatisfiedBy(net.corda.core.contracts.Attachment)
public static final net.corda.core.contracts.AlwaysAcceptAttachmentConstraint INSTANCE
##
@ -284,14 +282,14 @@ public static final class net.corda.core.contracts.AmountTransfer$Companion exte
@org.jetbrains.annotations.NotNull public abstract java.io.InputStream open()
@org.jetbrains.annotations.NotNull public abstract jar.JarInputStream openAsJAR()
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public interface net.corda.core.contracts.AttachmentConstraint
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public interface net.corda.core.contracts.AttachmentConstraint
public abstract boolean isSatisfiedBy(net.corda.core.contracts.Attachment)
##
@net.corda.core.serialization.CordaSerializable public final class net.corda.core.contracts.AttachmentResolutionException extends net.corda.core.flows.FlowException
public <init>(net.corda.core.crypto.SecureHash)
@org.jetbrains.annotations.NotNull public final net.corda.core.crypto.SecureHash getHash()
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.contracts.AutomaticHashConstraint extends java.lang.Object implements net.corda.core.contracts.AttachmentConstraint
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.contracts.AutomaticHashConstraint extends java.lang.Object implements net.corda.core.contracts.AttachmentConstraint
public boolean isSatisfiedBy(net.corda.core.contracts.Attachment)
public static final net.corda.core.contracts.AutomaticHashConstraint INSTANCE
##
@ -372,7 +370,7 @@ public final class net.corda.core.contracts.ContractsDSL extends java.lang.Objec
@org.jetbrains.annotations.NotNull public abstract Collection getExitKeys()
@org.jetbrains.annotations.NotNull public abstract net.corda.core.contracts.FungibleAsset withNewOwnerAndAmount(net.corda.core.contracts.Amount, net.corda.core.identity.AbstractParty)
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.contracts.HashAttachmentConstraint extends java.lang.Object implements net.corda.core.contracts.AttachmentConstraint
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.contracts.HashAttachmentConstraint extends java.lang.Object implements net.corda.core.contracts.AttachmentConstraint
public <init>(net.corda.core.crypto.SecureHash)
@org.jetbrains.annotations.NotNull public final net.corda.core.crypto.SecureHash component1()
@org.jetbrains.annotations.NotNull public final net.corda.core.contracts.HashAttachmentConstraint copy(net.corda.core.crypto.SecureHash)
@ -642,7 +640,7 @@ public static final class net.corda.core.contracts.UniqueIdentifier$Companion ex
@net.corda.core.serialization.CordaSerializable public interface net.corda.core.contracts.UpgradedContractWithLegacyConstraint extends net.corda.core.contracts.UpgradedContract
@org.jetbrains.annotations.NotNull public abstract net.corda.core.contracts.AttachmentConstraint getLegacyContractConstraint()
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.contracts.WhitelistedByZoneAttachmentConstraint extends java.lang.Object implements net.corda.core.contracts.AttachmentConstraint
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.contracts.WhitelistedByZoneAttachmentConstraint extends java.lang.Object implements net.corda.core.contracts.AttachmentConstraint
public boolean isSatisfiedBy(net.corda.core.contracts.Attachment)
public static final net.corda.core.contracts.WhitelistedByZoneAttachmentConstraint INSTANCE
##
@ -701,6 +699,7 @@ public static final class net.corda.core.crypto.CompositeKey$Builder extends jav
public <init>()
@org.jetbrains.annotations.NotNull public final net.corda.core.crypto.CompositeKey$Builder addKey(java.security.PublicKey, int)
@org.jetbrains.annotations.NotNull public final net.corda.core.crypto.CompositeKey$Builder addKeys(List)
@org.jetbrains.annotations.NotNull public final net.corda.core.crypto.CompositeKey$Builder addKeys(java.security.PublicKey...)
@org.jetbrains.annotations.NotNull public final java.security.PublicKey build(Integer)
##
public static final class net.corda.core.crypto.CompositeKey$Companion extends java.lang.Object
@ -771,8 +770,8 @@ public static final class net.corda.core.crypto.CompositeSignaturesWithKeys$Comp
@org.jetbrains.annotations.NotNull public final net.corda.core.crypto.CompositeSignaturesWithKeys getEMPTY()
##
public final class net.corda.core.crypto.CordaObjectIdentifier extends java.lang.Object
@kotlin.jvm.JvmField @org.jetbrains.annotations.NotNull public static final org.bouncycastle.asn1.ASN1ObjectIdentifier COMPOSITE_KEY
@kotlin.jvm.JvmField @org.jetbrains.annotations.NotNull public static final org.bouncycastle.asn1.ASN1ObjectIdentifier COMPOSITE_SIGNATURE
@org.jetbrains.annotations.NotNull public static final org.bouncycastle.asn1.ASN1ObjectIdentifier COMPOSITE_KEY
@org.jetbrains.annotations.NotNull public static final org.bouncycastle.asn1.ASN1ObjectIdentifier COMPOSITE_SIGNATURE
public static final net.corda.core.crypto.CordaObjectIdentifier INSTANCE
##
public final class net.corda.core.crypto.CordaSecurityProvider extends java.security.Provider
@ -818,15 +817,15 @@ public final class net.corda.core.crypto.Crypto extends java.lang.Object
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public static final java.security.PrivateKey toSupportedPrivateKey(java.security.PrivateKey)
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public static final java.security.PublicKey toSupportedPublicKey(java.security.PublicKey)
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public static final java.security.PublicKey toSupportedPublicKey(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo)
@kotlin.jvm.JvmField @org.jetbrains.annotations.NotNull public static final net.corda.core.crypto.SignatureScheme COMPOSITE_KEY
@kotlin.jvm.JvmField @org.jetbrains.annotations.NotNull public static final net.corda.core.crypto.SignatureScheme DEFAULT_SIGNATURE_SCHEME
@kotlin.jvm.JvmField @org.jetbrains.annotations.NotNull public static final net.corda.core.crypto.SignatureScheme ECDSA_SECP256K1_SHA256
@kotlin.jvm.JvmField @org.jetbrains.annotations.NotNull public static final net.corda.core.crypto.SignatureScheme ECDSA_SECP256R1_SHA256
@kotlin.jvm.JvmField @org.jetbrains.annotations.NotNull public static final net.corda.core.crypto.SignatureScheme EDDSA_ED25519_SHA512
@org.jetbrains.annotations.NotNull public static final net.corda.core.crypto.SignatureScheme COMPOSITE_KEY
@org.jetbrains.annotations.NotNull public static final net.corda.core.crypto.SignatureScheme DEFAULT_SIGNATURE_SCHEME
@org.jetbrains.annotations.NotNull public static final net.corda.core.crypto.SignatureScheme ECDSA_SECP256K1_SHA256
@org.jetbrains.annotations.NotNull public static final net.corda.core.crypto.SignatureScheme ECDSA_SECP256R1_SHA256
@org.jetbrains.annotations.NotNull public static final net.corda.core.crypto.SignatureScheme EDDSA_ED25519_SHA512
public static final net.corda.core.crypto.Crypto INSTANCE
@kotlin.jvm.JvmField @org.jetbrains.annotations.NotNull public static final net.corda.core.crypto.SignatureScheme RSA_SHA256
@kotlin.jvm.JvmField @org.jetbrains.annotations.NotNull public static final org.bouncycastle.asn1.DLSequence SHA512_256
@kotlin.jvm.JvmField @org.jetbrains.annotations.NotNull public static final net.corda.core.crypto.SignatureScheme SPHINCS256_SHA256
@org.jetbrains.annotations.NotNull public static final net.corda.core.crypto.SignatureScheme RSA_SHA256
@org.jetbrains.annotations.NotNull public static final org.bouncycastle.asn1.DLSequence SHA512_256
@org.jetbrains.annotations.NotNull public static final net.corda.core.crypto.SignatureScheme SPHINCS256_SHA256
##
public final class net.corda.core.crypto.CryptoUtils extends java.lang.Object
@org.jetbrains.annotations.NotNull public static final Set byKeys(Iterable)
@ -1110,6 +1109,7 @@ public static final class net.corda.core.flows.AbstractStateReplacementFlow$Upgr
##
@co.paralleluniverse.fibers.Suspendable public final class net.corda.core.flows.CollectSignatureFlow extends net.corda.core.flows.FlowLogic
public <init>(net.corda.core.transactions.SignedTransaction, net.corda.core.flows.FlowSession, List)
public <init>(net.corda.core.transactions.SignedTransaction, net.corda.core.flows.FlowSession, java.security.PublicKey...)
@co.paralleluniverse.fibers.Suspendable @org.jetbrains.annotations.NotNull public List call()
@org.jetbrains.annotations.NotNull public final net.corda.core.transactions.SignedTransaction getPartiallySignedTx()
@org.jetbrains.annotations.NotNull public final net.corda.core.flows.FlowSession getSession()
@ -1253,7 +1253,7 @@ public abstract class net.corda.core.flows.FlowLogic extends java.lang.Object
public final void checkFlowPermission(String, Map)
@co.paralleluniverse.fibers.Suspendable @org.jetbrains.annotations.Nullable public final net.corda.core.flows.FlowStackSnapshot flowStackSnapshot()
@org.jetbrains.annotations.Nullable public static final net.corda.core.flows.FlowLogic getCurrentTopLevel()
@kotlin.Deprecated @co.paralleluniverse.fibers.Suspendable @org.jetbrains.annotations.NotNull public final net.corda.core.flows.FlowInfo getFlowInfo(net.corda.core.identity.Party)
@co.paralleluniverse.fibers.Suspendable @kotlin.Deprecated @org.jetbrains.annotations.NotNull public final net.corda.core.flows.FlowInfo getFlowInfo(net.corda.core.identity.Party)
@org.jetbrains.annotations.NotNull public final org.slf4j.Logger getLogger()
@org.jetbrains.annotations.NotNull public final net.corda.core.identity.Party getOurIdentity()
@org.jetbrains.annotations.NotNull public final net.corda.core.identity.PartyAndCertificate getOurIdentityAndCert()
@ -1262,12 +1262,12 @@ public abstract class net.corda.core.flows.FlowLogic extends java.lang.Object
@org.jetbrains.annotations.NotNull public final net.corda.core.node.ServiceHub getServiceHub()
@co.paralleluniverse.fibers.Suspendable @org.jetbrains.annotations.NotNull public final net.corda.core.flows.FlowSession initiateFlow(net.corda.core.identity.Party)
@co.paralleluniverse.fibers.Suspendable public final void persistFlowStackSnapshot()
@kotlin.Deprecated @co.paralleluniverse.fibers.Suspendable @org.jetbrains.annotations.NotNull public net.corda.core.utilities.UntrustworthyData receive(Class, net.corda.core.identity.Party)
@co.paralleluniverse.fibers.Suspendable @kotlin.Deprecated @org.jetbrains.annotations.NotNull public net.corda.core.utilities.UntrustworthyData receive(Class, net.corda.core.identity.Party)
@co.paralleluniverse.fibers.Suspendable @org.jetbrains.annotations.NotNull public List receiveAll(Class, List)
@co.paralleluniverse.fibers.Suspendable @org.jetbrains.annotations.NotNull public Map receiveAllMap(Map)
public final void recordAuditEvent(String, String, Map)
@kotlin.Deprecated @co.paralleluniverse.fibers.Suspendable public void send(net.corda.core.identity.Party, Object)
@kotlin.Deprecated @co.paralleluniverse.fibers.Suspendable @org.jetbrains.annotations.NotNull public net.corda.core.utilities.UntrustworthyData sendAndReceive(Class, net.corda.core.identity.Party, Object)
@co.paralleluniverse.fibers.Suspendable @kotlin.Deprecated public void send(net.corda.core.identity.Party, Object)
@co.paralleluniverse.fibers.Suspendable @kotlin.Deprecated @org.jetbrains.annotations.NotNull public net.corda.core.utilities.UntrustworthyData sendAndReceive(Class, net.corda.core.identity.Party, Object)
@co.paralleluniverse.fibers.Suspendable @kotlin.jvm.JvmStatic public static final void sleep(java.time.Duration)
@co.paralleluniverse.fibers.Suspendable public Object subFlow(net.corda.core.flows.FlowLogic)
@org.jetbrains.annotations.Nullable public final net.corda.core.messaging.DataFeed track()
@ -1281,9 +1281,11 @@ public static final class net.corda.core.flows.FlowLogic$Companion extends java.
@org.jetbrains.annotations.Nullable public final net.corda.core.flows.FlowLogic getCurrentTopLevel()
@co.paralleluniverse.fibers.Suspendable @kotlin.jvm.JvmStatic public final void sleep(java.time.Duration)
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public interface net.corda.core.flows.FlowLogicRef
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public interface net.corda.core.flows.FlowLogicRef
##
@net.corda.core.DoNotImplement public interface net.corda.core.flows.FlowLogicRefFactory
@org.jetbrains.annotations.NotNull public abstract net.corda.core.flows.FlowLogicRef create(Class, Object...)
@org.jetbrains.annotations.NotNull public abstract net.corda.core.flows.FlowLogicRef create(String, Object...)
@org.jetbrains.annotations.NotNull public abstract net.corda.core.flows.FlowLogic toFlowLogic(net.corda.core.flows.FlowLogicRef)
##
@net.corda.core.DoNotImplement public abstract class net.corda.core.flows.FlowSession extends java.lang.Object
@ -1421,7 +1423,7 @@ public static final class net.corda.core.flows.NotarisationRequest$Companion ext
public int hashCode()
@org.jetbrains.annotations.NotNull public String toString()
public static final net.corda.core.flows.NotaryError$TimeWindowInvalid$Companion Companion
@kotlin.jvm.JvmField @org.jetbrains.annotations.NotNull public static final net.corda.core.flows.NotaryError$TimeWindowInvalid INSTANCE
@org.jetbrains.annotations.NotNull public static final net.corda.core.flows.NotaryError$TimeWindowInvalid INSTANCE
##
public static final class net.corda.core.flows.NotaryError$TimeWindowInvalid$Companion extends java.lang.Object
##
@ -1445,7 +1447,7 @@ public static final class net.corda.core.flows.NotaryError$TimeWindowInvalid$Com
public final class net.corda.core.flows.NotaryFlow extends java.lang.Object
public <init>()
##
@net.corda.core.flows.InitiatingFlow @net.corda.core.DoNotImplement public static class net.corda.core.flows.NotaryFlow$Client extends net.corda.core.flows.FlowLogic
@net.corda.core.DoNotImplement @net.corda.core.flows.InitiatingFlow public static class net.corda.core.flows.NotaryFlow$Client extends net.corda.core.flows.FlowLogic
public <init>(net.corda.core.transactions.SignedTransaction)
public <init>(net.corda.core.transactions.SignedTransaction, net.corda.core.utilities.ProgressTracker)
@co.paralleluniverse.fibers.Suspendable @org.jetbrains.annotations.NotNull public List call()
@ -1574,15 +1576,16 @@ public final class net.corda.core.flows.TransactionParts extends java.lang.Objec
public <init>(String)
public <init>(String, Throwable)
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public abstract class net.corda.core.identity.AbstractParty extends java.lang.Object
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public abstract class net.corda.core.identity.AbstractParty extends java.lang.Object
public <init>(java.security.PublicKey)
public boolean equals(Object)
@org.jetbrains.annotations.NotNull public final java.security.PublicKey getOwningKey()
public int hashCode()
@org.jetbrains.annotations.Nullable public abstract net.corda.core.identity.CordaX500Name nameOrNull()
@org.jetbrains.annotations.NotNull public abstract net.corda.core.contracts.PartyAndReference ref(net.corda.core.utilities.OpaqueBytes)
@org.jetbrains.annotations.NotNull public final net.corda.core.contracts.PartyAndReference ref(byte...)
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.identity.AnonymousParty extends net.corda.core.identity.AbstractParty
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.identity.AnonymousParty extends net.corda.core.identity.AbstractParty
public <init>(java.security.PublicKey)
@org.jetbrains.annotations.Nullable public net.corda.core.identity.CordaX500Name nameOrNull()
@org.jetbrains.annotations.NotNull public net.corda.core.contracts.PartyAndReference ref(net.corda.core.utilities.OpaqueBytes)
@ -1631,7 +1634,7 @@ public final class net.corda.core.identity.IdentityUtils extends java.lang.Objec
@org.jetbrains.annotations.NotNull public static final Map groupPublicKeysByWellKnownParty(net.corda.core.node.ServiceHub, Collection)
@org.jetbrains.annotations.NotNull public static final Map groupPublicKeysByWellKnownParty(net.corda.core.node.ServiceHub, Collection, boolean)
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.identity.Party extends net.corda.core.identity.AbstractParty
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.identity.Party extends net.corda.core.identity.AbstractParty
public <init>(java.security.cert.X509Certificate)
public <init>(net.corda.core.identity.CordaX500Name, java.security.PublicKey)
@org.jetbrains.annotations.NotNull public final net.corda.core.identity.AnonymousParty anonymise()
@ -1680,6 +1683,8 @@ public final class net.corda.core.identity.IdentityUtils extends java.lang.Objec
@org.jetbrains.annotations.NotNull public abstract List queryAttachments(net.corda.core.node.services.vault.AttachmentQueryCriteria, net.corda.core.node.services.vault.AttachmentSort)
@org.jetbrains.annotations.NotNull public abstract List registeredFlows()
public abstract void setFlowsDrainingModeEnabled(boolean)
@net.corda.core.messaging.RPCReturnsObservables @org.jetbrains.annotations.NotNull public abstract net.corda.core.messaging.FlowHandle startFlowDynamic(Class, Object...)
@net.corda.core.messaging.RPCReturnsObservables @org.jetbrains.annotations.NotNull public abstract net.corda.core.messaging.FlowProgressHandle startTrackedFlowDynamic(Class, Object...)
@net.corda.core.messaging.RPCReturnsObservables @org.jetbrains.annotations.NotNull public abstract net.corda.core.messaging.DataFeed stateMachineRecordedTransactionMappingFeed()
@org.jetbrains.annotations.NotNull public abstract List stateMachineRecordedTransactionMappingSnapshot()
@net.corda.core.messaging.RPCReturnsObservables @org.jetbrains.annotations.NotNull public abstract net.corda.core.messaging.DataFeed stateMachinesFeed()
@ -1718,7 +1723,7 @@ public final class net.corda.core.messaging.CordaRPCOpsKt extends java.lang.Obje
@org.jetbrains.annotations.NotNull public abstract net.corda.core.flows.StateMachineRunId getId()
@org.jetbrains.annotations.NotNull public abstract net.corda.core.concurrent.CordaFuture getReturnValue()
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.messaging.FlowHandleImpl extends java.lang.Object implements net.corda.core.messaging.FlowHandle
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.messaging.FlowHandleImpl extends java.lang.Object implements net.corda.core.messaging.FlowHandle
public <init>(net.corda.core.flows.StateMachineRunId, net.corda.core.concurrent.CordaFuture)
public void close()
@org.jetbrains.annotations.NotNull public final net.corda.core.flows.StateMachineRunId component1()
@ -1736,7 +1741,7 @@ public final class net.corda.core.messaging.CordaRPCOpsKt extends java.lang.Obje
@org.jetbrains.annotations.Nullable public abstract net.corda.core.messaging.DataFeed getStepsTreeFeed()
@org.jetbrains.annotations.Nullable public abstract net.corda.core.messaging.DataFeed getStepsTreeIndexFeed()
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.messaging.FlowProgressHandleImpl extends java.lang.Object implements net.corda.core.messaging.FlowProgressHandle
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.messaging.FlowProgressHandleImpl extends java.lang.Object implements net.corda.core.messaging.FlowProgressHandle
public <init>(net.corda.core.flows.StateMachineRunId, net.corda.core.concurrent.CordaFuture, rx.Observable)
public <init>(net.corda.core.flows.StateMachineRunId, net.corda.core.concurrent.CordaFuture, rx.Observable, net.corda.core.messaging.DataFeed)
public <init>(net.corda.core.flows.StateMachineRunId, net.corda.core.concurrent.CordaFuture, rx.Observable, net.corda.core.messaging.DataFeed, net.corda.core.messaging.DataFeed)
@ -1911,7 +1916,9 @@ public @interface net.corda.core.messaging.RPCReturnsObservables
@org.jetbrains.annotations.NotNull public abstract java.sql.Connection jdbcSession()
public abstract void recordTransactions(Iterable)
public abstract void recordTransactions(net.corda.core.node.StatesToRecord, Iterable)
public abstract void recordTransactions(net.corda.core.transactions.SignedTransaction, net.corda.core.transactions.SignedTransaction...)
public abstract void recordTransactions(boolean, Iterable)
public abstract void recordTransactions(boolean, net.corda.core.transactions.SignedTransaction, net.corda.core.transactions.SignedTransaction...)
public abstract void registerUnloadHandler(kotlin.jvm.functions.Function0)
@org.jetbrains.annotations.NotNull public abstract net.corda.core.transactions.SignedTransaction signInitialTransaction(net.corda.core.transactions.TransactionBuilder)
@org.jetbrains.annotations.NotNull public abstract net.corda.core.transactions.SignedTransaction signInitialTransaction(net.corda.core.transactions.TransactionBuilder, Iterable)
@ -2306,12 +2313,12 @@ public interface net.corda.core.node.services.vault.BaseQueryCriteriaParser
public abstract class net.corda.core.node.services.vault.BaseSort extends java.lang.Object
public <init>()
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.node.services.vault.BinaryComparisonOperator extends java.lang.Enum implements net.corda.core.node.services.vault.Operator
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.node.services.vault.BinaryComparisonOperator extends java.lang.Enum implements net.corda.core.node.services.vault.Operator
protected <init>(String, int)
public static net.corda.core.node.services.vault.BinaryComparisonOperator valueOf(String)
public static net.corda.core.node.services.vault.BinaryComparisonOperator[] values()
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.node.services.vault.BinaryLogicalOperator extends java.lang.Enum implements net.corda.core.node.services.vault.Operator
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.node.services.vault.BinaryLogicalOperator extends java.lang.Enum implements net.corda.core.node.services.vault.Operator
protected <init>(String, int)
public static net.corda.core.node.services.vault.BinaryLogicalOperator valueOf(String)
public static net.corda.core.node.services.vault.BinaryLogicalOperator[] values()
@ -2383,7 +2390,7 @@ public abstract class net.corda.core.node.services.vault.BaseSort extends java.l
@org.jetbrains.annotations.NotNull public final net.corda.core.node.services.vault.CriteriaExpression$AggregateFunctionExpression sum(kotlin.reflect.KProperty1, List, net.corda.core.node.services.vault.Sort$Direction)
public static final net.corda.core.node.services.vault.Builder INSTANCE
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.node.services.vault.CollectionOperator extends java.lang.Enum implements net.corda.core.node.services.vault.Operator
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.node.services.vault.CollectionOperator extends java.lang.Enum implements net.corda.core.node.services.vault.Operator
protected <init>(String, int)
public static net.corda.core.node.services.vault.CollectionOperator valueOf(String)
public static net.corda.core.node.services.vault.CollectionOperator[] values()
@ -2520,7 +2527,7 @@ public abstract class net.corda.core.node.services.vault.BaseSort extends java.l
public int hashCode()
public String toString()
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.node.services.vault.EqualityComparisonOperator extends java.lang.Enum implements net.corda.core.node.services.vault.Operator
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.node.services.vault.EqualityComparisonOperator extends java.lang.Enum implements net.corda.core.node.services.vault.Operator
protected <init>(String, int)
public static net.corda.core.node.services.vault.EqualityComparisonOperator valueOf(String)
public static net.corda.core.node.services.vault.EqualityComparisonOperator[] values()
@ -2549,17 +2556,17 @@ public static interface net.corda.core.node.services.vault.GenericQueryCriteria$
@org.jetbrains.annotations.NotNull public abstract Collection parseCriteria(net.corda.core.node.services.vault.QueryCriteria$VaultCustomQueryCriteria)
@org.jetbrains.annotations.NotNull public abstract Collection parseCriteria(net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria)
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.node.services.vault.LikenessOperator extends java.lang.Enum implements net.corda.core.node.services.vault.Operator
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.node.services.vault.LikenessOperator extends java.lang.Enum implements net.corda.core.node.services.vault.Operator
protected <init>(String, int)
public static net.corda.core.node.services.vault.LikenessOperator valueOf(String)
public static net.corda.core.node.services.vault.LikenessOperator[] values()
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.node.services.vault.NullOperator extends java.lang.Enum implements net.corda.core.node.services.vault.Operator
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.node.services.vault.NullOperator extends java.lang.Enum implements net.corda.core.node.services.vault.Operator
protected <init>(String, int)
public static net.corda.core.node.services.vault.NullOperator valueOf(String)
public static net.corda.core.node.services.vault.NullOperator[] values()
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public interface net.corda.core.node.services.vault.Operator
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public interface net.corda.core.node.services.vault.Operator
##
@net.corda.core.serialization.CordaSerializable public final class net.corda.core.node.services.vault.PageSpecification extends java.lang.Object
public <init>()
@ -2741,9 +2748,9 @@ public final class net.corda.core.node.services.vault.QueryCriteriaUtils extends
public int hashCode()
public String toString()
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public static interface net.corda.core.node.services.vault.Sort$Attribute
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public static interface net.corda.core.node.services.vault.Sort$Attribute
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public static final class net.corda.core.node.services.vault.Sort$CommonStateAttribute extends java.lang.Enum implements net.corda.core.node.services.vault.Sort$Attribute
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public static final class net.corda.core.node.services.vault.Sort$CommonStateAttribute extends java.lang.Enum implements net.corda.core.node.services.vault.Sort$Attribute
protected <init>(String, int, String, String)
@org.jetbrains.annotations.Nullable public final String getAttributeChild()
@org.jetbrains.annotations.NotNull public final String getAttributeParent()
@ -2755,13 +2762,13 @@ public final class net.corda.core.node.services.vault.QueryCriteriaUtils extends
public static net.corda.core.node.services.vault.Sort$Direction valueOf(String)
public static net.corda.core.node.services.vault.Sort$Direction[] values()
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public static final class net.corda.core.node.services.vault.Sort$FungibleStateAttribute extends java.lang.Enum implements net.corda.core.node.services.vault.Sort$Attribute
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public static final class net.corda.core.node.services.vault.Sort$FungibleStateAttribute extends java.lang.Enum implements net.corda.core.node.services.vault.Sort$Attribute
protected <init>(String, int, String)
@org.jetbrains.annotations.NotNull public final String getAttributeName()
public static net.corda.core.node.services.vault.Sort$FungibleStateAttribute valueOf(String)
public static net.corda.core.node.services.vault.Sort$FungibleStateAttribute[] values()
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public static final class net.corda.core.node.services.vault.Sort$LinearStateAttribute extends java.lang.Enum implements net.corda.core.node.services.vault.Sort$Attribute
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public static final class net.corda.core.node.services.vault.Sort$LinearStateAttribute extends java.lang.Enum implements net.corda.core.node.services.vault.Sort$Attribute
protected <init>(String, int, String)
@org.jetbrains.annotations.NotNull public final String getAttributeName()
public static net.corda.core.node.services.vault.Sort$LinearStateAttribute valueOf(String)
@ -2778,7 +2785,7 @@ public final class net.corda.core.node.services.vault.QueryCriteriaUtils extends
public int hashCode()
public String toString()
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public static final class net.corda.core.node.services.vault.Sort$VaultStateAttribute extends java.lang.Enum implements net.corda.core.node.services.vault.Sort$Attribute
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public static final class net.corda.core.node.services.vault.Sort$VaultStateAttribute extends java.lang.Enum implements net.corda.core.node.services.vault.Sort$Attribute
protected <init>(String, int, String)
@org.jetbrains.annotations.NotNull public final String getAttributeName()
public static net.corda.core.node.services.vault.Sort$VaultStateAttribute valueOf(String)
@ -3018,7 +3025,7 @@ public static final class net.corda.core.serialization.SingletonSerializationTok
@org.jetbrains.annotations.NotNull public final net.corda.core.crypto.SecureHash getId()
@org.jetbrains.annotations.NotNull public final String getReason()
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.transactions.ContractUpgradeFilteredTransaction extends net.corda.core.transactions.CoreTransaction
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.transactions.ContractUpgradeFilteredTransaction extends net.corda.core.transactions.CoreTransaction
public <init>(Map, Map)
@org.jetbrains.annotations.NotNull public final Map component1()
@org.jetbrains.annotations.NotNull public final Map component2()
@ -3067,8 +3074,9 @@ public static final class net.corda.core.serialization.SingletonSerializationTok
public String toString()
public void verifyRequiredSignatures()
public void verifySignaturesExcept(Collection)
public void verifySignaturesExcept(java.security.PublicKey...)
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.transactions.ContractUpgradeWireTransaction extends net.corda.core.transactions.CoreTransaction
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.transactions.ContractUpgradeWireTransaction extends net.corda.core.transactions.CoreTransaction
public <init>(List, net.corda.core.contracts.PrivacySalt)
@org.jetbrains.annotations.NotNull public final net.corda.core.transactions.ContractUpgradeFilteredTransaction buildFilteredTransaction()
@org.jetbrains.annotations.NotNull public final List component1()
@ -3093,7 +3101,7 @@ public static final class net.corda.core.transactions.ContractUpgradeWireTransac
public static net.corda.core.transactions.ContractUpgradeWireTransaction$Component valueOf(String)
public static net.corda.core.transactions.ContractUpgradeWireTransaction$Component[] values()
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public abstract class net.corda.core.transactions.CoreTransaction extends net.corda.core.transactions.BaseTransaction
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public abstract class net.corda.core.transactions.CoreTransaction extends net.corda.core.transactions.BaseTransaction
public <init>()
@org.jetbrains.annotations.NotNull public abstract List getInputs()
##
@ -3112,7 +3120,7 @@ public static final class net.corda.core.transactions.ContractUpgradeWireTransac
public int hashCode()
public String toString()
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.transactions.FilteredTransaction extends net.corda.core.transactions.TraversableTransaction
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.transactions.FilteredTransaction extends net.corda.core.transactions.TraversableTransaction
public <init>(net.corda.core.crypto.SecureHash, List, List)
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public static final net.corda.core.transactions.FilteredTransaction buildFilteredTransaction(net.corda.core.transactions.WireTransaction, function.Predicate)
public final void checkAllComponentsVisible(net.corda.core.contracts.ComponentGroupEnum)
@ -3137,7 +3145,7 @@ public static final class net.corda.core.transactions.FilteredTransaction$Compan
protected void checkBaseInvariants()
@org.jetbrains.annotations.NotNull public abstract List getInputs()
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.transactions.LedgerTransaction extends net.corda.core.transactions.FullTransaction
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.transactions.LedgerTransaction extends net.corda.core.transactions.FullTransaction
public <init>(List, List, List, List, net.corda.core.crypto.SecureHash, net.corda.core.identity.Party, net.corda.core.contracts.TimeWindow, net.corda.core.contracts.PrivacySalt)
public <init>(List, List, List, List, net.corda.core.crypto.SecureHash, net.corda.core.identity.Party, net.corda.core.contracts.TimeWindow, net.corda.core.contracts.PrivacySalt, net.corda.core.node.NetworkParameters)
@org.jetbrains.annotations.NotNull public final List commandsOfType(Class)
@ -3220,8 +3228,9 @@ public static final class net.corda.core.transactions.LedgerTransaction$InOutGro
public String toString()
public void verifyRequiredSignatures()
public void verifySignaturesExcept(Collection)
public void verifySignaturesExcept(java.security.PublicKey...)
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.transactions.NotaryChangeWireTransaction extends net.corda.core.transactions.CoreTransaction
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.transactions.NotaryChangeWireTransaction extends net.corda.core.transactions.CoreTransaction
public <init>(List)
@kotlin.Deprecated public <init>(List, net.corda.core.identity.Party, net.corda.core.identity.Party)
@org.jetbrains.annotations.NotNull public final List component1()
@ -3243,7 +3252,7 @@ public static final class net.corda.core.transactions.NotaryChangeWireTransactio
public static net.corda.core.transactions.NotaryChangeWireTransaction$Component valueOf(String)
public static net.corda.core.transactions.NotaryChangeWireTransaction$Component[] values()
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.transactions.SignedTransaction extends java.lang.Object implements net.corda.core.transactions.TransactionWithSignatures
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.transactions.SignedTransaction extends java.lang.Object implements net.corda.core.transactions.TransactionWithSignatures
public <init>(net.corda.core.serialization.SerializedBytes, List)
public <init>(net.corda.core.transactions.CoreTransaction, List)
@org.jetbrains.annotations.NotNull public final net.corda.core.transactions.FilteredTransaction buildFilteredTransaction(function.Predicate)
@ -3279,6 +3288,7 @@ public static final class net.corda.core.transactions.NotaryChangeWireTransactio
public final void verify(net.corda.core.node.ServiceHub, boolean)
public void verifyRequiredSignatures()
public void verifySignaturesExcept(Collection)
public void verifySignaturesExcept(java.security.PublicKey...)
@org.jetbrains.annotations.NotNull public final net.corda.core.transactions.SignedTransaction withAdditionalSignature(java.security.KeyPair, net.corda.core.crypto.SignatureMetadata)
@org.jetbrains.annotations.NotNull public final net.corda.core.transactions.SignedTransaction withAdditionalSignature(net.corda.core.crypto.TransactionSignature)
@org.jetbrains.annotations.NotNull public final net.corda.core.transactions.SignedTransaction withAdditionalSignatures(Iterable)
@ -3303,6 +3313,7 @@ public class net.corda.core.transactions.TransactionBuilder extends java.lang.Ob
@org.jetbrains.annotations.NotNull public final net.corda.core.transactions.TransactionBuilder addAttachment(net.corda.core.crypto.SecureHash)
@org.jetbrains.annotations.NotNull public final net.corda.core.transactions.TransactionBuilder addCommand(net.corda.core.contracts.Command)
@org.jetbrains.annotations.NotNull public final net.corda.core.transactions.TransactionBuilder addCommand(net.corda.core.contracts.CommandData, List)
@org.jetbrains.annotations.NotNull public final net.corda.core.transactions.TransactionBuilder addCommand(net.corda.core.contracts.CommandData, java.security.PublicKey...)
@org.jetbrains.annotations.NotNull public net.corda.core.transactions.TransactionBuilder addInputState(net.corda.core.contracts.StateAndRef)
@org.jetbrains.annotations.NotNull public final net.corda.core.transactions.TransactionBuilder addOutputState(net.corda.core.contracts.ContractState, String)
@org.jetbrains.annotations.NotNull public final net.corda.core.transactions.TransactionBuilder addOutputState(net.corda.core.contracts.ContractState, String, net.corda.core.contracts.AttachmentConstraint)
@ -3334,6 +3345,7 @@ public class net.corda.core.transactions.TransactionBuilder extends java.lang.Ob
@org.jetbrains.annotations.NotNull public final net.corda.core.transactions.SignedTransaction toSignedTransaction(net.corda.core.node.services.KeyManagementService, java.security.PublicKey, net.corda.core.crypto.SignatureMetadata, net.corda.core.node.ServicesForResolution)
@org.jetbrains.annotations.NotNull public final net.corda.core.transactions.WireTransaction toWireTransaction(net.corda.core.node.ServicesForResolution)
public final void verify(net.corda.core.node.ServiceHub)
@org.jetbrains.annotations.NotNull public final net.corda.core.transactions.TransactionBuilder withItems(Object...)
##
@net.corda.core.DoNotImplement public interface net.corda.core.transactions.TransactionWithSignatures extends net.corda.core.contracts.NamedByHash
public abstract void checkSignaturesAreValid()
@ -3343,8 +3355,9 @@ public class net.corda.core.transactions.TransactionBuilder extends java.lang.Ob
@org.jetbrains.annotations.NotNull public abstract List getSigs()
public abstract void verifyRequiredSignatures()
public abstract void verifySignaturesExcept(Collection)
public abstract void verifySignaturesExcept(java.security.PublicKey...)
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public abstract class net.corda.core.transactions.TraversableTransaction extends net.corda.core.transactions.CoreTransaction
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public abstract class net.corda.core.transactions.TraversableTransaction extends net.corda.core.transactions.CoreTransaction
public <init>(List)
@org.jetbrains.annotations.NotNull public final List getAttachments()
@org.jetbrains.annotations.NotNull public final List getAvailableComponentGroups()
@ -3355,7 +3368,7 @@ public class net.corda.core.transactions.TransactionBuilder extends java.lang.Ob
@org.jetbrains.annotations.NotNull public List getOutputs()
@org.jetbrains.annotations.Nullable public final net.corda.core.contracts.TimeWindow getTimeWindow()
##
@net.corda.core.serialization.CordaSerializable @net.corda.core.DoNotImplement public final class net.corda.core.transactions.WireTransaction extends net.corda.core.transactions.TraversableTransaction
@net.corda.core.DoNotImplement @net.corda.core.serialization.CordaSerializable public final class net.corda.core.transactions.WireTransaction extends net.corda.core.transactions.TraversableTransaction
@kotlin.Deprecated public <init>(List, List, List, List, net.corda.core.identity.Party, net.corda.core.contracts.TimeWindow, net.corda.core.contracts.PrivacySalt)
public <init>(List, net.corda.core.contracts.PrivacySalt)
@org.jetbrains.annotations.NotNull public final net.corda.core.transactions.FilteredTransaction buildFilteredTransaction(function.Predicate)
@ -3485,6 +3498,7 @@ public final class net.corda.core.utilities.NonEmptySet extends java.lang.Object
public boolean isEmpty()
@org.jetbrains.annotations.NotNull public Iterator iterator()
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public static final net.corda.core.utilities.NonEmptySet of(Object)
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public static final net.corda.core.utilities.NonEmptySet of(Object, Object, Object...)
@org.jetbrains.annotations.NotNull public stream.Stream parallelStream()
public boolean remove(Object)
public boolean removeAll(Collection)
@ -3499,6 +3513,7 @@ public final class net.corda.core.utilities.NonEmptySet extends java.lang.Object
public static final class net.corda.core.utilities.NonEmptySet$Companion extends java.lang.Object
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public final net.corda.core.utilities.NonEmptySet copyOf(Collection)
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public final net.corda.core.utilities.NonEmptySet of(Object)
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public final net.corda.core.utilities.NonEmptySet of(Object, Object, Object...)
##
public static final class net.corda.core.utilities.NonEmptySet$iterator$1 extends java.lang.Object implements java.util.Iterator, kotlin.jvm.internal.markers.KMappedMarker
public boolean hasNext()
@ -3510,9 +3525,11 @@ public static final class net.corda.core.utilities.NonEmptySet$iterator$1 extend
@org.jetbrains.annotations.NotNull public final byte[] getBytes()
public int getOffset()
public int getSize()
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public static final net.corda.core.utilities.OpaqueBytes of(byte...)
public static final net.corda.core.utilities.OpaqueBytes$Companion Companion
##
public static final class net.corda.core.utilities.OpaqueBytes$Companion extends java.lang.Object
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public final net.corda.core.utilities.OpaqueBytes of(byte...)
##
@net.corda.core.serialization.CordaSerializable public final class net.corda.core.utilities.OpaqueBytesSubSequence extends net.corda.core.utilities.ByteSequence
public <init>(byte[], int, int)
@ -3521,6 +3538,7 @@ public static final class net.corda.core.utilities.OpaqueBytes$Companion extends
public int getSize()
##
@net.corda.core.serialization.CordaSerializable public final class net.corda.core.utilities.ProgressTracker extends java.lang.Object
public <init>(net.corda.core.utilities.ProgressTracker$Step...)
public final void endWithError(Throwable)
@org.jetbrains.annotations.NotNull public final List getAllSteps()
@org.jetbrains.annotations.NotNull public final List getAllStepsLabels()
@ -3951,7 +3969,7 @@ public final class net.corda.testing.driver.NotaryHandle extends java.lang.Objec
@org.jetbrains.annotations.NotNull public final net.corda.core.utilities.NetworkHostAndPort nextHostAndPort()
public abstract int nextPort()
##
public static final class net.corda.testing.driver.PortAllocation$Incremental extends net.corda.testing.driver.PortAllocation
@net.corda.core.DoNotImplement public static final class net.corda.testing.driver.PortAllocation$Incremental extends net.corda.testing.driver.PortAllocation
public <init>(int)
@org.jetbrains.annotations.NotNull public final concurrent.atomic.AtomicInteger getPortCounter()
public int nextPort()
@ -3976,7 +3994,7 @@ public final class net.corda.testing.driver.WebserverHandle extends java.lang.Ob
public <init>()
public abstract int getClusterSize()
##
public static final class net.corda.testing.node.ClusterSpec$Raft extends net.corda.testing.node.ClusterSpec
@net.corda.core.DoNotImplement public static final class net.corda.testing.node.ClusterSpec$Raft extends net.corda.testing.node.ClusterSpec
public <init>(int)
public final int component1()
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.ClusterSpec$Raft copy(int)
@ -4036,13 +4054,13 @@ public static final class net.corda.testing.node.InMemoryMessagingNetwork$MockMe
@net.corda.core.DoNotImplement public abstract static class net.corda.testing.node.InMemoryMessagingNetwork$ServicePeerAllocationStrategy extends java.lang.Object
public abstract Object pickNext(net.corda.testing.node.InMemoryMessagingNetwork$DistributedServiceHandle, List)
##
public static final class net.corda.testing.node.InMemoryMessagingNetwork$ServicePeerAllocationStrategy$Random extends net.corda.testing.node.InMemoryMessagingNetwork$ServicePeerAllocationStrategy
@net.corda.core.DoNotImplement public static final class net.corda.testing.node.InMemoryMessagingNetwork$ServicePeerAllocationStrategy$Random extends net.corda.testing.node.InMemoryMessagingNetwork$ServicePeerAllocationStrategy
public <init>()
public <init>(SplittableRandom)
@org.jetbrains.annotations.NotNull public final SplittableRandom getRandom()
public Object pickNext(net.corda.testing.node.InMemoryMessagingNetwork$DistributedServiceHandle, List)
##
public static final class net.corda.testing.node.InMemoryMessagingNetwork$ServicePeerAllocationStrategy$RoundRobin extends net.corda.testing.node.InMemoryMessagingNetwork$ServicePeerAllocationStrategy
@net.corda.core.DoNotImplement public static final class net.corda.testing.node.InMemoryMessagingNetwork$ServicePeerAllocationStrategy$RoundRobin extends net.corda.testing.node.InMemoryMessagingNetwork$ServicePeerAllocationStrategy
public <init>()
public Object pickNext(net.corda.testing.node.InMemoryMessagingNetwork$DistributedServiceHandle, List)
##
@ -4140,9 +4158,17 @@ public class net.corda.testing.node.MockServices extends java.lang.Object implem
public <init>()
public <init>(List)
public <init>(List, net.corda.core.identity.CordaX500Name)
public <init>(List, net.corda.core.identity.CordaX500Name, java.security.KeyPair, java.security.KeyPair...)
public <init>(List, net.corda.core.identity.CordaX500Name, net.corda.core.node.services.IdentityService)
public <init>(List, net.corda.core.identity.CordaX500Name, net.corda.core.node.services.IdentityService, java.security.KeyPair, java.security.KeyPair...)
public <init>(List, net.corda.testing.core.TestIdentity, net.corda.core.node.services.IdentityService, net.corda.core.node.NetworkParameters, java.security.KeyPair...)
public <init>(List, net.corda.testing.core.TestIdentity, net.corda.core.node.services.IdentityService, java.security.KeyPair...)
public <init>(List, net.corda.testing.core.TestIdentity, java.security.KeyPair...)
public <init>(net.corda.core.identity.CordaX500Name)
public <init>(net.corda.core.identity.CordaX500Name, java.security.KeyPair, java.security.KeyPair...)
public <init>(net.corda.core.identity.CordaX500Name, net.corda.core.node.services.IdentityService)
public <init>(net.corda.core.identity.CordaX500Name, net.corda.core.node.services.IdentityService, java.security.KeyPair, java.security.KeyPair...)
public <init>(net.corda.testing.core.TestIdentity, net.corda.testing.core.TestIdentity...)
public final void addMockCordapp(String)
@org.jetbrains.annotations.NotNull public net.corda.core.transactions.SignedTransaction addSignature(net.corda.core.transactions.SignedTransaction)
@org.jetbrains.annotations.NotNull public net.corda.core.transactions.SignedTransaction addSignature(net.corda.core.transactions.SignedTransaction, java.security.PublicKey)
@ -4168,9 +4194,13 @@ public class net.corda.testing.node.MockServices extends java.lang.Object implem
@org.jetbrains.annotations.NotNull public net.corda.core.contracts.TransactionState loadState(net.corda.core.contracts.StateRef)
@org.jetbrains.annotations.NotNull public Set loadStates(Set)
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public static final Properties makeTestDataSourceProperties(String)
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public static final kotlin.Pair makeTestDatabaseAndMockServices(List, net.corda.core.node.services.IdentityService, net.corda.testing.core.TestIdentity, net.corda.core.node.NetworkParameters, java.security.KeyPair...)
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public static final kotlin.Pair makeTestDatabaseAndMockServices(List, net.corda.core.node.services.IdentityService, net.corda.testing.core.TestIdentity, java.security.KeyPair...)
public void recordTransactions(Iterable)
public void recordTransactions(net.corda.core.node.StatesToRecord, Iterable)
public void recordTransactions(net.corda.core.transactions.SignedTransaction, net.corda.core.transactions.SignedTransaction...)
public void recordTransactions(boolean, Iterable)
public void recordTransactions(boolean, net.corda.core.transactions.SignedTransaction, net.corda.core.transactions.SignedTransaction...)
@org.jetbrains.annotations.NotNull public Void registerUnloadHandler(kotlin.jvm.functions.Function0)
@org.jetbrains.annotations.NotNull public net.corda.core.transactions.SignedTransaction signInitialTransaction(net.corda.core.transactions.TransactionBuilder)
@org.jetbrains.annotations.NotNull public net.corda.core.transactions.SignedTransaction signInitialTransaction(net.corda.core.transactions.TransactionBuilder, Iterable)
@ -4180,6 +4210,8 @@ public class net.corda.testing.node.MockServices extends java.lang.Object implem
##
public static final class net.corda.testing.node.MockServices$Companion extends java.lang.Object
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public final Properties makeTestDataSourceProperties(String)
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public final kotlin.Pair makeTestDatabaseAndMockServices(List, net.corda.core.node.services.IdentityService, net.corda.testing.core.TestIdentity, net.corda.core.node.NetworkParameters, java.security.KeyPair...)
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public final kotlin.Pair makeTestDatabaseAndMockServices(List, net.corda.core.node.services.IdentityService, net.corda.testing.core.TestIdentity, java.security.KeyPair...)
##
public static final class net.corda.testing.node.MockServices$Companion$makeTestDatabaseAndMockServices$mockService$1$1 extends net.corda.testing.node.MockServices
@org.jetbrains.annotations.NotNull public net.corda.core.node.services.VaultService getVaultService()
@ -4188,6 +4220,7 @@ public static final class net.corda.testing.node.MockServices$Companion$makeTest
##
public final class net.corda.testing.node.MockServicesKt extends java.lang.Object
@org.jetbrains.annotations.NotNull public static final net.corda.core.serialization.SerializeAsToken createMockCordaService(net.corda.testing.node.MockServices, kotlin.jvm.functions.Function1)
@org.jetbrains.annotations.NotNull public static final net.corda.node.services.identity.InMemoryIdentityService makeTestIdentityService(net.corda.core.identity.PartyAndCertificate...)
##
public static final class net.corda.testing.node.MockServicesKt$createMockCordaService$MockAppServiceHubImpl extends java.lang.Object implements net.corda.core.node.AppServiceHub, net.corda.core.node.ServiceHub
public <init>(net.corda.testing.node.MockServices, net.corda.testing.node.MockServices, kotlin.jvm.functions.Function1)
@ -4217,7 +4250,9 @@ public static final class net.corda.testing.node.MockServicesKt$createMockCordaS
@org.jetbrains.annotations.NotNull public Set loadStates(Set)
public void recordTransactions(Iterable)
public void recordTransactions(net.corda.core.node.StatesToRecord, Iterable)
public void recordTransactions(net.corda.core.transactions.SignedTransaction, net.corda.core.transactions.SignedTransaction...)
public void recordTransactions(boolean, Iterable)
public void recordTransactions(boolean, net.corda.core.transactions.SignedTransaction, net.corda.core.transactions.SignedTransaction...)
public void registerUnloadHandler(kotlin.jvm.functions.Function0)
@org.jetbrains.annotations.NotNull public net.corda.core.transactions.SignedTransaction signInitialTransaction(net.corda.core.transactions.TransactionBuilder)
@org.jetbrains.annotations.NotNull public net.corda.core.transactions.SignedTransaction signInitialTransaction(net.corda.core.transactions.TransactionBuilder, Iterable)
@ -4309,11 +4344,11 @@ public final class net.corda.client.rpc.CordaRPCClientConfiguration extends java
public int hashCode()
public String toString()
public static final net.corda.client.rpc.CordaRPCClientConfiguration$Companion Companion
@kotlin.jvm.JvmField @org.jetbrains.annotations.NotNull public static final net.corda.client.rpc.CordaRPCClientConfiguration DEFAULT
@org.jetbrains.annotations.NotNull public static final net.corda.client.rpc.CordaRPCClientConfiguration DEFAULT
##
public static final class net.corda.client.rpc.CordaRPCClientConfiguration$Companion extends java.lang.Object
##
public final class net.corda.client.rpc.CordaRPCConnection extends java.lang.Object implements net.corda.client.rpc.RPCConnection
@net.corda.core.DoNotImplement public final class net.corda.client.rpc.CordaRPCConnection extends java.lang.Object implements net.corda.client.rpc.RPCConnection
public <init>(net.corda.client.rpc.RPCConnection)
public void close()
public void forceClose()
@ -4346,6 +4381,7 @@ public final class net.corda.testing.contracts.DummyContract extends java.lang.O
@org.jetbrains.annotations.Nullable public final Object component1()
@org.jetbrains.annotations.NotNull public final net.corda.testing.contracts.DummyContract copy(Object)
public boolean equals(Object)
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public static final net.corda.core.transactions.TransactionBuilder generateInitial(int, net.corda.core.identity.Party, net.corda.core.contracts.PartyAndReference, net.corda.core.contracts.PartyAndReference...)
@org.jetbrains.annotations.Nullable public final Object getBlank()
@org.jetbrains.annotations.NotNull public final String getPROGRAM_ID()
public int hashCode()
@ -4365,10 +4401,11 @@ public static final class net.corda.testing.contracts.DummyContract$Commands$Mov
public <init>()
##
public static final class net.corda.testing.contracts.DummyContract$Companion extends java.lang.Object
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public final net.corda.core.transactions.TransactionBuilder generateInitial(int, net.corda.core.identity.Party, net.corda.core.contracts.PartyAndReference, net.corda.core.contracts.PartyAndReference...)
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public final net.corda.core.transactions.TransactionBuilder move(List, net.corda.core.identity.AbstractParty)
@kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull public final net.corda.core.transactions.TransactionBuilder move(net.corda.core.contracts.StateAndRef, net.corda.core.identity.AbstractParty)
##
public static final class net.corda.testing.contracts.DummyContract$MultiOwnerState extends java.lang.Object implements net.corda.testing.contracts.DummyContract$State
@net.corda.core.DoNotImplement public static final class net.corda.testing.contracts.DummyContract$MultiOwnerState extends java.lang.Object implements net.corda.testing.contracts.DummyContract$State
public <init>(int, List)
public final int component1()
@org.jetbrains.annotations.NotNull public final List component2()
@ -4380,7 +4417,7 @@ public static final class net.corda.testing.contracts.DummyContract$MultiOwnerSt
public int hashCode()
public String toString()
##
public static final class net.corda.testing.contracts.DummyContract$SingleOwnerState extends java.lang.Object implements net.corda.testing.contracts.DummyContract$State, net.corda.core.contracts.OwnableState
@net.corda.core.DoNotImplement public static final class net.corda.testing.contracts.DummyContract$SingleOwnerState extends java.lang.Object implements net.corda.testing.contracts.DummyContract$State, net.corda.core.contracts.OwnableState
public <init>(int, net.corda.core.identity.AbstractParty)
public final int component1()
@org.jetbrains.annotations.NotNull public final net.corda.core.identity.AbstractParty component2()
@ -4456,15 +4493,15 @@ public final class net.corda.testing.core.Expect extends java.lang.Object
##
@net.corda.core.DoNotImplement public abstract class net.corda.testing.core.ExpectCompose extends java.lang.Object
##
public static final class net.corda.testing.core.ExpectCompose$Parallel extends net.corda.testing.core.ExpectCompose
@net.corda.core.DoNotImplement public static final class net.corda.testing.core.ExpectCompose$Parallel extends net.corda.testing.core.ExpectCompose
public <init>(List)
@org.jetbrains.annotations.NotNull public final List getParallel()
##
public static final class net.corda.testing.core.ExpectCompose$Sequential extends net.corda.testing.core.ExpectCompose
@net.corda.core.DoNotImplement public static final class net.corda.testing.core.ExpectCompose$Sequential extends net.corda.testing.core.ExpectCompose
public <init>(List)
@org.jetbrains.annotations.NotNull public final List getSequence()
##
public static final class net.corda.testing.core.ExpectCompose$Single extends net.corda.testing.core.ExpectCompose
@net.corda.core.DoNotImplement public static final class net.corda.testing.core.ExpectCompose$Single extends net.corda.testing.core.ExpectCompose
public <init>(net.corda.testing.core.Expect)
@org.jetbrains.annotations.NotNull public final net.corda.testing.core.Expect getExpect()
##
@ -4503,8 +4540,10 @@ public final class net.corda.testing.core.ExpectKt extends java.lang.Object
public static final void expectEvents(rx.Observable, boolean, kotlin.jvm.functions.Function0)
public static final void genericExpectEvents(Object, boolean, kotlin.jvm.functions.Function2, kotlin.jvm.functions.Function0)
@org.jetbrains.annotations.NotNull public static final net.corda.testing.core.ExpectCompose parallel(List)
@org.jetbrains.annotations.NotNull public static final net.corda.testing.core.ExpectCompose parallel(net.corda.testing.core.ExpectCompose...)
@org.jetbrains.annotations.NotNull public static final net.corda.testing.core.ExpectCompose replicate(int, kotlin.jvm.functions.Function1)
@org.jetbrains.annotations.NotNull public static final net.corda.testing.core.ExpectCompose sequence(List)
@org.jetbrains.annotations.NotNull public static final net.corda.testing.core.ExpectCompose sequence(net.corda.testing.core.ExpectCompose...)
##
public static final class net.corda.testing.core.ExpectKt$expectEvents$1$lock$1 extends java.lang.Object
##
@ -4523,14 +4562,15 @@ public static final class net.corda.testing.core.SerializationEnvironmentRule$ap
public void evaluate()
##
public final class net.corda.testing.core.TestConstants extends java.lang.Object
@kotlin.jvm.JvmField @org.jetbrains.annotations.NotNull public static final net.corda.core.identity.CordaX500Name ALICE_NAME
@kotlin.jvm.JvmField @org.jetbrains.annotations.NotNull public static final net.corda.core.identity.CordaX500Name BOB_NAME
@kotlin.jvm.JvmField @org.jetbrains.annotations.NotNull public static final net.corda.core.identity.CordaX500Name BOC_NAME
@kotlin.jvm.JvmField @org.jetbrains.annotations.NotNull public static final net.corda.core.identity.CordaX500Name CHARLIE_NAME
@kotlin.jvm.JvmField @org.jetbrains.annotations.NotNull public static final net.corda.core.identity.CordaX500Name DUMMY_BANK_A_NAME
@kotlin.jvm.JvmField @org.jetbrains.annotations.NotNull public static final net.corda.core.identity.CordaX500Name DUMMY_BANK_B_NAME
@kotlin.jvm.JvmField @org.jetbrains.annotations.NotNull public static final net.corda.core.identity.CordaX500Name DUMMY_BANK_C_NAME
@kotlin.jvm.JvmField @org.jetbrains.annotations.NotNull public static final net.corda.core.identity.CordaX500Name DUMMY_NOTARY_NAME
@org.jetbrains.annotations.NotNull public static final net.corda.core.contracts.Command dummyCommand(java.security.PublicKey...)
@org.jetbrains.annotations.NotNull public static final net.corda.core.identity.CordaX500Name ALICE_NAME
@org.jetbrains.annotations.NotNull public static final net.corda.core.identity.CordaX500Name BOB_NAME
@org.jetbrains.annotations.NotNull public static final net.corda.core.identity.CordaX500Name BOC_NAME
@org.jetbrains.annotations.NotNull public static final net.corda.core.identity.CordaX500Name CHARLIE_NAME
@org.jetbrains.annotations.NotNull public static final net.corda.core.identity.CordaX500Name DUMMY_BANK_A_NAME
@org.jetbrains.annotations.NotNull public static final net.corda.core.identity.CordaX500Name DUMMY_BANK_B_NAME
@org.jetbrains.annotations.NotNull public static final net.corda.core.identity.CordaX500Name DUMMY_BANK_C_NAME
@org.jetbrains.annotations.NotNull public static final net.corda.core.identity.CordaX500Name DUMMY_NOTARY_NAME
public static final int MAX_MESSAGE_SIZE = 10485760
##
public final class net.corda.testing.core.TestIdentity extends java.lang.Object
@ -4542,6 +4582,7 @@ public final class net.corda.testing.core.TestIdentity extends java.lang.Object
@org.jetbrains.annotations.NotNull public final net.corda.core.identity.CordaX500Name getName()
@org.jetbrains.annotations.NotNull public final net.corda.core.identity.Party getParty()
@org.jetbrains.annotations.NotNull public final java.security.PublicKey getPublicKey()
@org.jetbrains.annotations.NotNull public final net.corda.core.contracts.PartyAndReference ref(byte...)
public static final net.corda.testing.core.TestIdentity$Companion Companion
##
public static final class net.corda.testing.core.TestIdentity$Companion extends java.lang.Object
@ -4568,10 +4609,10 @@ public final class net.corda.testing.dsl.DuplicateOutputLabel extends net.corda.
##
@net.corda.core.DoNotImplement public abstract class net.corda.testing.dsl.EnforceVerifyOrFail extends java.lang.Object
##
public static final class net.corda.testing.dsl.EnforceVerifyOrFail$Token extends net.corda.testing.dsl.EnforceVerifyOrFail
@net.corda.core.DoNotImplement public static final class net.corda.testing.dsl.EnforceVerifyOrFail$Token extends net.corda.testing.dsl.EnforceVerifyOrFail
public static final net.corda.testing.dsl.EnforceVerifyOrFail$Token INSTANCE
##
public final class net.corda.testing.dsl.LedgerDSL extends java.lang.Object implements net.corda.testing.dsl.LedgerDSLInterpreter
@net.corda.core.DoNotImplement public final class net.corda.testing.dsl.LedgerDSL extends java.lang.Object implements net.corda.testing.dsl.LedgerDSLInterpreter
public <init>(net.corda.testing.dsl.LedgerDSLInterpreter, net.corda.core.identity.Party)
@org.jetbrains.annotations.NotNull public net.corda.core.transactions.WireTransaction _transaction(String, net.corda.core.transactions.TransactionBuilder, kotlin.jvm.functions.Function1)
public void _tweak(kotlin.jvm.functions.Function1)
@ -4601,7 +4642,7 @@ public final class net.corda.testing.dsl.LedgerDSL extends java.lang.Object impl
@net.corda.core.DoNotImplement public interface net.corda.testing.dsl.OutputStateLookup
@org.jetbrains.annotations.NotNull public abstract net.corda.core.contracts.StateAndRef retrieveOutputStateAndRef(Class, String)
##
public final class net.corda.testing.dsl.TestLedgerDSLInterpreter extends java.lang.Object implements net.corda.testing.dsl.LedgerDSLInterpreter
@net.corda.core.DoNotImplement public final class net.corda.testing.dsl.TestLedgerDSLInterpreter extends java.lang.Object implements net.corda.testing.dsl.LedgerDSLInterpreter
public <init>(net.corda.core.node.ServiceHub)
@org.jetbrains.annotations.NotNull public net.corda.core.transactions.WireTransaction _transaction(String, net.corda.core.transactions.TransactionBuilder, kotlin.jvm.functions.Function1)
public void _tweak(kotlin.jvm.functions.Function1)
@ -4646,7 +4687,7 @@ public static final class net.corda.testing.dsl.TestLedgerDSLInterpreter$WireTra
public int hashCode()
public String toString()
##
public final class net.corda.testing.dsl.TestTransactionDSLInterpreter extends java.lang.Object implements net.corda.testing.dsl.TransactionDSLInterpreter, net.corda.testing.dsl.OutputStateLookup
@net.corda.core.DoNotImplement public final class net.corda.testing.dsl.TestTransactionDSLInterpreter extends java.lang.Object implements net.corda.testing.dsl.TransactionDSLInterpreter, net.corda.testing.dsl.OutputStateLookup
public <init>(net.corda.testing.dsl.TestLedgerDSLInterpreter, net.corda.core.transactions.TransactionBuilder)
public void _attachment(String)
@org.jetbrains.annotations.NotNull public net.corda.testing.dsl.EnforceVerifyOrFail _tweak(kotlin.jvm.functions.Function1)
@ -4678,12 +4719,13 @@ public static final class net.corda.testing.dsl.TestTransactionDSLInterpreter$se
@org.jetbrains.annotations.NotNull public net.corda.core.contracts.TransactionState loadState(net.corda.core.contracts.StateRef)
@org.jetbrains.annotations.NotNull public Set loadStates(Set)
##
public final class net.corda.testing.dsl.TransactionDSL extends java.lang.Object implements net.corda.testing.dsl.TransactionDSLInterpreter
@net.corda.core.DoNotImplement public final class net.corda.testing.dsl.TransactionDSL extends java.lang.Object implements net.corda.testing.dsl.TransactionDSLInterpreter
public <init>(net.corda.testing.dsl.TransactionDSLInterpreter, net.corda.core.identity.Party)
public void _attachment(String)
@org.jetbrains.annotations.NotNull public net.corda.testing.dsl.EnforceVerifyOrFail _tweak(kotlin.jvm.functions.Function1)
public final void attachment(String)
public void attachment(net.corda.core.crypto.SecureHash)
public final void attachments(String...)
public final void command(java.security.PublicKey, net.corda.core.contracts.CommandData)
public void command(List, net.corda.core.contracts.CommandData)
@org.jetbrains.annotations.NotNull public net.corda.testing.dsl.EnforceVerifyOrFail fails()

View File

@ -1,4 +1,4 @@
gradlePluginsVersion=3.0.9
gradlePluginsVersion=3.1.0
kotlinVersion=1.1.60
platformVersion=3
guavaVersion=21.0

View File

@ -4,6 +4,17 @@ Changelog
Here are brief summaries of what's changed between each snapshot release. This includes guidance on how to upgrade code
from the previous milestone release.
.. _changelog_v3_1:
Version 3.1
-----------
* Updated the api scanner gradle plugin to work the same way as the version in master. These changes make the api scanner more
accurate and fix a couple of bugs, and change the format of the api-current.txt file slightly. Backporting these changes
to the v3 branch will make it easier for us to ensure that apis are stable for future versions. These changes are
released in gradle plugins version 3.0.10. For more information on the api scanner see
the `documentation <https://github.com/corda/corda-gradle-plugins/tree/master/api-scanner>`_.
.. _changelog_v3:
Version 3.0

View File

@ -28,13 +28,31 @@ versions you are currently using are still in force.
We also strongly recommend cross referencing with the :doc:`changelog` to confirm changes.
v3.0 to v3.1
------------
Gradle Plugin Version
^^^^^^^^^^^^^^^^^^^^^
Corda 3.1 uses version 3.1.0 of the gradle plugins and your ``build.gradle`` file should be updated to reflect this.
.. sourcecode:: shell
ext.corda_gradle_plugins_version = '3.1.0'
You will also need to update the ``corda_release_version`` identifier in your project gradle file.
.. sourcecode:: shell
ext.corda_release_version = 'corda-3.1'
V2.0 to V3.0
------------
Gradle Plugin Version
^^^^^^^^^^^^^^^^^^^^^
Corda 3.0 uses version 3.0.8 of the gradle plugins and your ``build.gradle`` file should be updated to reflect this.
Corda 3.0 uses version 3.0.9 of the gradle plugins and your ``build.gradle`` file should be updated to reflect this.
.. sourcecode:: shell

View File

@ -6,7 +6,7 @@ Generates a text summary of Corda's public API that we can check for API-breakin
$ gradlew generateApi
```
See [here](../../docs/source/corda-api.rst) for Corda's public API strategy. We will need to
See [here](https://github.com/corda/corda/blob/master/docs/source/corda-api.rst) for Corda's public API strategy. We will need to
apply this plugin to other modules in future Corda releases as those modules' APIs stabilise.
Basically, this plugin will document a module's `public` and `protected` classes/methods/fields,
@ -76,4 +76,4 @@ or in any of that project's subprojects. So it is _theoretically_ possible also
from subtrees of modules simply by defining a new `GenerateApi` task at the root of that subtree.
## Plugin Installation
See [here](../README.rst) for full installation instructions.
See [here](../README.md) for full installation instructions.

View File

@ -0,0 +1,7 @@
apply plugin: 'java'
description 'A library of annotations for testing API Scanner.'
jar {
archiveName 'annotations.jar'
}

View File

@ -0,0 +1,14 @@
package net.corda.annotation;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, METHOD})
@Retention(CLASS)
@Inherited
public @interface AlsoInherited {
}

View File

@ -0,0 +1,14 @@
package net.corda.annotation;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, METHOD})
@Retention(CLASS)
@Inherited
public @interface IsInherited {
}

View File

@ -0,0 +1,12 @@
package net.corda.annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, METHOD})
@Retention(CLASS)
public @interface NotInherited {
}

View File

@ -1,4 +1,5 @@
apply plugin: 'java'
apply plugin: 'java-gradle-plugin'
apply plugin: 'net.corda.plugins.publish-utils'
apply plugin: 'com.jfrog.artifactory'
@ -7,15 +8,36 @@ description "Generates a summary of the artifact's public API"
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
gradlePlugin {
plugins {
apiScannerPlugin {
id = 'net.corda.plugins.api-scanner'
implementationClass = 'net.corda.plugins.ApiScanner'
}
}
}
dependencies {
compile gradleApi()
compile "io.github.lukehutch:fast-classpath-scanner:2.7.0"
testCompile "junit:junit:4.12"
testCompile "org.assertj:assertj-core:$assertj_version"
testCompile "junit:junit:$junit_version"
// This dependency is only to prevent IntelliJ from choking
// on the Kotlin classes in the test/resources directory.
testCompile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
testCompile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
testCompile project(':api-scanner:annotations')
}
processTestResources {
filesMatching('**/kotlin-*/build.gradle') {
expand(['kotlin_version': kotlin_version])
}
}
publish {
name project.name
}

View File

@ -7,6 +7,8 @@ import org.gradle.api.file.FileCollection;
import org.gradle.api.tasks.TaskCollection;
import org.gradle.jvm.tasks.Jar;
import javax.annotation.Nonnull;
public class ApiScanner implements Plugin<Project> {
/**
@ -16,7 +18,7 @@ public class ApiScanner implements Plugin<Project> {
* @param p Current project.
*/
@Override
public void apply(Project p) {
public void apply(@Nonnull Project p) {
p.getLogger().info("Applying API scanner to {}", p.getName());
ScannerExtension extension = p.getExtensions().create("scanApi", ScannerExtension.class);

View File

@ -1,18 +1,12 @@
package net.corda.plugins;
import io.github.lukehutch.fastclasspathscanner.FastClasspathScanner;
import io.github.lukehutch.fastclasspathscanner.scanner.ClassInfo;
import io.github.lukehutch.fastclasspathscanner.scanner.FieldInfo;
import io.github.lukehutch.fastclasspathscanner.scanner.MethodInfo;
import io.github.lukehutch.fastclasspathscanner.scanner.ScanResult;
import io.github.lukehutch.fastclasspathscanner.scanner.*;
import org.gradle.api.DefaultTask;
import org.gradle.api.file.ConfigurableFileCollection;
import org.gradle.api.file.FileCollection;
import org.gradle.api.tasks.CompileClasspath;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.InputFiles;
import org.gradle.api.tasks.OutputFiles;
import org.gradle.api.tasks.TaskAction;
import org.gradle.api.tasks.*;
import org.gradle.api.tasks.Console;
import java.io.*;
import java.lang.annotation.Annotation;
@ -33,14 +27,24 @@ import static java.util.stream.Collectors.*;
public class ScanApi extends DefaultTask {
private static final int CLASS_MASK = Modifier.classModifiers();
private static final int INTERFACE_MASK = Modifier.interfaceModifiers() & ~Modifier.ABSTRACT;
private static final int METHOD_MASK = Modifier.methodModifiers();
/**
* The VARARG modifier for methods has the same value as the TRANSIENT modifier for fields.
* Unfortunately, {@link Modifier#methodModifiers() methodModifiers} doesn't include this
* flag, and so we need to add it back ourselves.
* @link https://docs.oracle.com/javase/specs/jls/se8/html/index.html
*/
private static final int METHOD_MASK = Modifier.methodModifiers() | Modifier.TRANSIENT;
private static final int FIELD_MASK = Modifier.fieldModifiers();
private static final int VISIBILITY_MASK = Modifier.PUBLIC | Modifier.PROTECTED;
private static final String INTERNAL_ANNOTATION_NAME = ".CordaInternal";
private static final String DEFAULT_INTERNAL_ANNOTATION = "net.corda.core" + INTERNAL_ANNOTATION_NAME;
private static final Set<String> ANNOTATION_BLACKLIST;
static {
Set<String> blacklist = new LinkedHashSet<>();
blacklist.add("kotlin.jvm.JvmField");
blacklist.add("kotlin.jvm.JvmOverloads");
blacklist.add(DEFAULT_INTERNAL_ANNOTATION);
ANNOTATION_BLACKLIST = unmodifiableSet(blacklist);
}
@ -65,6 +69,7 @@ public class ScanApi extends DefaultTask {
outputDir = new File(getProject().getBuildDir(), "api");
}
@SkipWhenEmpty
@InputFiles
public FileCollection getSources() {
return sources;
@ -103,6 +108,7 @@ public class ScanApi extends DefaultTask {
);
}
@Console
public boolean isVerbose() {
return verbose;
}
@ -112,7 +118,7 @@ public class ScanApi extends DefaultTask {
}
private File toTarget(File source) {
return new File(outputDir, source.getName().replaceAll(".jar$", ".txt"));
return new File(outputDir, source.getName().replaceAll("\\.jar$", ".txt"));
}
@TaskAction
@ -130,10 +136,16 @@ public class ScanApi extends DefaultTask {
private final URLClassLoader classpathLoader;
private final Class<? extends Annotation> metadataClass;
private final Method classTypeMethod;
private Collection<String> internalAnnotations;
private Collection<String> invisibleAnnotations;
private Collection<String> inheritedAnnotations;
@SuppressWarnings("unchecked")
Scanner(URLClassLoader classpathLoader) {
this.classpathLoader = classpathLoader;
this.invisibleAnnotations = ANNOTATION_BLACKLIST;
this.inheritedAnnotations = emptySet();
this.internalAnnotations = emptySet();
Class<? extends Annotation> kClass;
Method kMethod;
@ -160,6 +172,7 @@ public class ScanApi extends DefaultTask {
void scan(File source) {
File target = toTarget(source);
getLogger().info("API file: {}", target.getAbsolutePath());
try (
URLClassLoader appLoader = new URLClassLoader(new URL[]{ toURL(source) }, classpathLoader);
PrintWriter writer = new PrintWriter(target, "UTF-8")
@ -171,7 +184,13 @@ public class ScanApi extends DefaultTask {
}
void scan(PrintWriter writer, ClassLoader appLoader) {
Set<String> inherited = new HashSet<>();
ScanResult result = new FastClasspathScanner(getScanSpecification())
.matchAllAnnotationClasses(annotation -> {
if (annotation.isAnnotationPresent(Inherited.class)) {
inherited.add(annotation.getName());
}
})
.overrideClassLoaders(appLoader)
.ignoreParentClassLoaders()
.ignoreMethodVisibility()
@ -180,6 +199,12 @@ public class ScanApi extends DefaultTask {
.enableFieldInfo()
.verbose(verbose)
.scan();
inheritedAnnotations = unmodifiableSet(inherited);
loadAnnotationCaches(result);
getLogger().info("Annotations:");
getLogger().info("- Inherited: {}", inheritedAnnotations);
getLogger().info("- Internal: {}", internalAnnotations);
getLogger().info("- Invisible: {}", invisibleAnnotations);
writeApis(writer, result);
}
@ -195,6 +220,21 @@ public class ScanApi extends DefaultTask {
return spec;
}
private void loadAnnotationCaches(ScanResult result) {
Set<String> internal = result.getNamesOfAllAnnotationClasses().stream()
.filter(s -> s.endsWith(INTERNAL_ANNOTATION_NAME))
.collect(toCollection(LinkedHashSet::new));
internal.add(DEFAULT_INTERNAL_ANNOTATION);
internalAnnotations = unmodifiableSet(internal);
Set<String> invisible = internalAnnotations.stream()
.flatMap(a -> result.getNamesOfAnnotationsWithMetaAnnotation(a).stream())
.collect(toCollection(LinkedHashSet::new));
invisible.addAll(ANNOTATION_BLACKLIST);
invisible.addAll(internal);
invisibleAnnotations = unmodifiableSet(invisible);
}
private void writeApis(PrintWriter writer, ScanResult result) {
Map<String, ClassInfo> allInfo = result.getClassNameToClassInfo();
result.getNamesOfAllClasses().forEach(className -> {
@ -216,6 +256,12 @@ public class ScanApi extends DefaultTask {
return;
}
if (classInfo.isAnnotation() && !isVisibleAnnotation(className)) {
// Exclude these annotations from the output,
// e.g. because they're internal to Kotlin or Corda.
return;
}
Class<?> javaClass = result.classNameToClassRef(className);
if (!isVisible(javaClass.getModifiers())) {
// Excludes private and package-protected classes
@ -246,9 +292,9 @@ public class ScanApi extends DefaultTask {
/*
* Class declaration.
*/
List<String> annotationNames = toNames(readClassAnnotationsFor(classInfo));
if (!annotationNames.isEmpty()) {
writer.append(asAnnotations(annotationNames));
Names annotationNames = toNames(readClassAnnotationsFor(classInfo));
if (!annotationNames.visible.isEmpty()) {
writer.append(asAnnotations(annotationNames.visible));
}
writer.append(Modifier.toString(modifiers & CLASS_MASK));
writer.append(" class ").print(classInfo);
@ -264,9 +310,9 @@ public class ScanApi extends DefaultTask {
/*
* Interface declaration.
*/
List<String> annotationNames = toNames(readInterfaceAnnotationsFor(classInfo));
if (!annotationNames.isEmpty()) {
writer.append(asAnnotations(annotationNames));
Names annotationNames = toNames(readInterfaceAnnotationsFor(classInfo));
if (!annotationNames.visible.isEmpty()) {
writer.append(asAnnotations(annotationNames.visible));
}
writer.append(Modifier.toString(modifiers & INTERFACE_MASK));
writer.append(" interface ").print(classInfo);
@ -283,7 +329,7 @@ public class ScanApi extends DefaultTask {
for (MethodInfo method : methods) {
if (isVisible(method.getAccessFlags()) // Only public and protected methods
&& isValid(method.getAccessFlags(), METHOD_MASK) // Excludes bridge and synthetic methods
&& !hasCordaInternal(method.getAnnotationNames()) // Excludes methods annotated as @CordaInternal
&& !hasInternalAnnotation(method.getAnnotationNames()) // Excludes methods annotated as @CordaInternal
&& !isKotlinInternalScope(method)) {
writer.append(" ").println(filterAnnotationsFor(method));
}
@ -293,8 +339,10 @@ public class ScanApi extends DefaultTask {
private void writeFields(PrintWriter output, List<FieldInfo> fields) {
sort(fields);
for (FieldInfo field : fields) {
if (isVisible(field.getAccessFlags()) && isValid(field.getAccessFlags(), FIELD_MASK)) {
output.append(" ").println(field);
if (isVisible(field.getAccessFlags())
&& isValid(field.getAccessFlags(), FIELD_MASK)
&& !hasInternalAnnotation(field.getAnnotationNames())) {
output.append(" ").println(filterAnnotationsFor(field));
}
}
}
@ -313,11 +361,12 @@ public class ScanApi extends DefaultTask {
return 0;
}
private List<String> toNames(Collection<ClassInfo> classes) {
return classes.stream()
private Names toNames(Collection<ClassInfo> classes) {
Map<Boolean, List<String>> partitioned = classes.stream()
.map(ClassInfo::toString)
.filter(ScanApi::isApplicationClass)
.collect(toList());
.collect(partitioningBy(this::isVisibleAnnotation, toCollection(ArrayList::new)));
return new Names(ordering(partitioned.get(true)), ordering(partitioned.get(false)));
}
private Set<ClassInfo> readClassAnnotationsFor(ClassInfo classInfo) {
@ -339,7 +388,7 @@ public class ScanApi extends DefaultTask {
private List<ClassInfo> selectInheritedAnnotations(Collection<ClassInfo> classes) {
return classes.stream()
.flatMap(cls -> cls.getAnnotations().stream())
.filter(ann -> ann.hasMetaAnnotation(Inherited.class.getName()))
.filter(ann -> inheritedAnnotations.contains(ann.getClassName()))
.collect(toList());
}
@ -350,24 +399,44 @@ public class ScanApi extends DefaultTask {
method.getAccessFlags(),
method.getTypeDescriptor(),
method.getAnnotationNames().stream()
.filter(ScanApi::isVisibleAnnotation)
.filter(this::isVisibleAnnotation)
.sorted()
.collect(toList())
);
}
private FieldInfo filterAnnotationsFor(FieldInfo field) {
return new FieldInfo(
field.getClassName(),
field.getFieldName(),
field.getAccessFlags(),
field.getTypeDescriptor(),
field.getConstFinalValue(),
field.getAnnotationNames().stream()
.filter(this::isVisibleAnnotation)
.sorted()
.collect(toList())
);
}
private boolean isVisibleAnnotation(String annotationName) {
return !invisibleAnnotations.contains(annotationName);
}
private boolean hasInternalAnnotation(Collection<String> annotationNames) {
return annotationNames.stream().anyMatch(internalAnnotations::contains);
}
}
private static boolean isVisibleAnnotation(String annotationName) {
return !ANNOTATION_BLACKLIST.contains(annotationName);
private static <T extends Comparable<? super T>> List<T> ordering(List<T> list) {
sort(list);
return list;
}
private static boolean isKotlinInternalScope(MethodInfo method) {
return method.getMethodName().indexOf('$') >= 0;
}
private static boolean hasCordaInternal(Collection<String> annotationNames) {
return annotationNames.contains("net.corda.core.CordaInternal");
}
private static boolean isValid(int modifiers, int mask) {
return (modifiers & mask) == modifiers;
}
@ -400,3 +469,17 @@ public class ScanApi extends DefaultTask {
return urls.toArray(new URL[urls.size()]);
}
}
class Names {
List<String> visible;
@SuppressWarnings("WeakerAccess") List<String> hidden;
Names(List<String> visible, List<String> hidden) {
this.visible = unmodifiable(visible);
this.hidden = unmodifiable(hidden);
}
private static <T> List<T> unmodifiable(List<T> list) {
return list.isEmpty() ? emptyList() : unmodifiableList(new ArrayList<>(list));
}
}

View File

@ -0,0 +1,52 @@
package net.corda.plugins;
import org.gradle.testkit.runner.BuildResult;
import org.gradle.testkit.runner.BuildTask;
import org.gradle.testkit.runner.GradleRunner;
import static org.gradle.testkit.runner.TaskOutcome.*;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.*;
import static org.junit.Assert.*;
public class AnnotatedClassTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("annotated-class/build.gradle", buildFile);
}
@Test
public void testAnnotatedClass() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
Path api = pathOf(testProjectDir, "build", "api", "annotated-class.txt");
assertThat(api).isRegularFile();
assertThat(Files.readAllLines(api)).containsOnlyOnce(
"@net.corda.annotation.AlsoInherited @net.corda.annotation.IsInherited @net.corda.annotation.NotInherited public class net.corda.example.HasInheritedAnnotation extends java.lang.Object",
"@net.corda.annotation.AlsoInherited @net.corda.annotation.IsInherited public class net.corda.example.InheritingAnnotations extends net.corda.example.HasInheritedAnnotation"
);
}
}

View File

@ -0,0 +1,52 @@
package net.corda.plugins;
import org.gradle.testkit.runner.BuildResult;
import org.gradle.testkit.runner.BuildTask;
import org.gradle.testkit.runner.GradleRunner;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.*;
import static org.gradle.testkit.runner.TaskOutcome.*;
import static org.junit.Assert.*;
public class AnnotatedFieldTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("annotated-field/build.gradle", buildFile);
}
@Test
public void testAnnotatedField() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
Path api = pathOf(testProjectDir, "build", "api", "annotated-field.txt");
assertThat(api).isRegularFile();
assertThat(Files.readAllLines(api)).containsOnlyOnce(
"public class net.corda.example.HasAnnotatedField extends java.lang.Object",
" @net.corda.example.A @net.corda.example.B @net.corda.example.C public static final String ANNOTATED_FIELD = \"<string-value>\""
);
}
}

View File

@ -0,0 +1,52 @@
package net.corda.plugins;
import org.gradle.testkit.runner.BuildResult;
import org.gradle.testkit.runner.BuildTask;
import org.gradle.testkit.runner.GradleRunner;
import static org.gradle.testkit.runner.TaskOutcome.*;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.*;
import static org.junit.Assert.*;
public class AnnotatedInterfaceTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("annotated-interface/build.gradle", buildFile);
}
@Test
public void testAnnotatedInterface() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
Path api = pathOf(testProjectDir, "build", "api", "annotated-interface.txt");
assertThat(api).isRegularFile();
assertThat(Files.readAllLines(api)).containsOnlyOnce(
"@net.corda.annotation.AlsoInherited @net.corda.annotation.IsInherited @net.corda.annotation.NotInherited public interface net.corda.example.HasInheritedAnnotation",
"@net.corda.annotation.AlsoInherited @net.corda.annotation.IsInherited public interface net.corda.example.InheritingAnnotations extends net.corda.example.HasInheritedAnnotation"
);
}
}

View File

@ -0,0 +1,52 @@
package net.corda.plugins;
import org.gradle.testkit.runner.BuildResult;
import org.gradle.testkit.runner.BuildTask;
import org.gradle.testkit.runner.GradleRunner;
import static org.gradle.testkit.runner.TaskOutcome.*;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.*;
import static org.junit.Assert.*;
public class AnnotatedMethodTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("annotated-method/build.gradle", buildFile);
}
@Test
public void testAnnotatedMethod() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
Path api = pathOf(testProjectDir, "build", "api", "annotated-method.txt");
assertThat(api).isRegularFile();
assertThat(Files.readAllLines(api)).containsOnlyOnce(
"public class net.corda.example.HasAnnotatedMethod extends java.lang.Object",
" @net.corda.example.A @net.corda.example.B @net.corda.example.C public void hasAnnotation()"
);
}
}

View File

@ -0,0 +1,50 @@
package net.corda.plugins;
import org.gradle.testkit.runner.BuildResult;
import org.gradle.testkit.runner.BuildTask;
import org.gradle.testkit.runner.GradleRunner;
import static org.gradle.testkit.runner.TaskOutcome.*;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.*;
import static org.junit.Assert.*;
public class BasicAnnotationTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("basic-annotation/build.gradle", buildFile);
}
@Test
public void testBasicAnnotation() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
Path api = pathOf(testProjectDir, "build", "api", "basic-annotation.txt");
assertThat(api).isRegularFile();
assertEquals(
"public @interface net.corda.example.BasicAnnotation\n" +
"##\n", CopyUtils.toString(api));
}
}

View File

@ -0,0 +1,52 @@
package net.corda.plugins;
import org.gradle.testkit.runner.BuildResult;
import org.gradle.testkit.runner.BuildTask;
import org.gradle.testkit.runner.GradleRunner;
import static org.gradle.testkit.runner.TaskOutcome.*;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.*;
import static org.junit.Assert.*;
public class BasicClassTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("basic-class/build.gradle", buildFile);
}
@Test
public void testBasicClass() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
Path api = pathOf(testProjectDir, "build", "api", "basic-class.txt");
assertThat(api).isRegularFile();
assertEquals(
"public class net.corda.example.BasicClass extends java.lang.Object\n" +
" public <init>(String)\n" +
" public String getName()\n" +
"##\n", CopyUtils.toString(api));
}
}

View File

@ -0,0 +1,51 @@
package net.corda.plugins;
import org.gradle.testkit.runner.BuildResult;
import org.gradle.testkit.runner.BuildTask;
import org.gradle.testkit.runner.GradleRunner;
import static org.gradle.testkit.runner.TaskOutcome.*;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.*;
import static org.junit.Assert.*;
public class BasicInterfaceTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("basic-interface/build.gradle", buildFile);
}
@Test
public void testBasicInterface() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
Path api = pathOf(testProjectDir, "build", "api", "basic-interface.txt");
assertThat(api).isRegularFile();
assertEquals(
"public interface net.corda.example.BasicInterface\n" +
" public abstract java.math.BigInteger getBigNumber()\n" +
"##\n", CopyUtils.toString(api));
}
}

View File

@ -0,0 +1,52 @@
package net.corda.plugins;
import org.gradle.testkit.runner.BuildResult;
import org.gradle.testkit.runner.BuildTask;
import org.gradle.testkit.runner.GradleRunner;
import static org.gradle.testkit.runner.TaskOutcome.*;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.*;
import static org.junit.Assert.*;
public class ClassWithInternalAnnotationTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("class-internal-annotation/build.gradle", buildFile);
}
@Test
public void testClassWithInternalAnnotation() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
assertThat(output).contains("net.corda.example.InvisibleAnnotation");
Path api = pathOf(testProjectDir, "build", "api", "class-internal-annotation.txt");
assertThat(api).isRegularFile();
assertEquals("public class net.corda.example.AnnotatedClass extends java.lang.Object\n" +
" public <init>()\n" +
"##\n", CopyUtils.toString(api));
}
}

View File

@ -0,0 +1,49 @@
package net.corda.plugins;
import org.junit.rules.TemporaryFolder;
import java.io.*;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import static java.nio.charset.StandardCharsets.UTF_8;
import static java.nio.file.StandardCopyOption.*;
public final class CopyUtils {
private static final String testGradleUserHome = System.getProperty("test.gradle.user.home", "");
private CopyUtils() {
}
public static long copyResourceTo(String resourceName, Path target) throws IOException {
try (InputStream input = CopyUtils.class.getClassLoader().getResourceAsStream(resourceName)) {
return Files.copy(input, target, REPLACE_EXISTING);
}
}
public static long copyResourceTo(String resourceName, File target) throws IOException {
return copyResourceTo(resourceName, target.toPath());
}
public static String toString(Path file) throws IOException {
return new String(Files.readAllBytes(file), UTF_8);
}
public static Path pathOf(TemporaryFolder folder, String... elements) {
return Paths.get(folder.getRoot().getAbsolutePath(), elements);
}
public static List<String> getGradleArgsForTasks(String... taskNames) {
List<String> args = new ArrayList<>(taskNames.length + 3);
Collections.addAll(args, taskNames);
args.add("--info");
if (!testGradleUserHome.isEmpty()) {
Collections.addAll(args,"-g", testGradleUserHome);
}
return args;
}
}

View File

@ -0,0 +1,51 @@
package net.corda.plugins;
import org.gradle.testkit.runner.BuildResult;
import org.gradle.testkit.runner.BuildTask;
import org.gradle.testkit.runner.GradleRunner;
import static org.gradle.testkit.runner.TaskOutcome.*;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.*;
import static org.junit.Assert.*;
public class ExtendedClassTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("extended-class/build.gradle", buildFile);
}
@Test
public void testExtendedClass() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
Path api = pathOf(testProjectDir, "build", "api", "extended-class.txt");
assertThat(api).isRegularFile();
assertEquals(
"public class net.corda.example.ExtendedClass extends java.io.FilterInputStream\n" +
" public <init>(java.io.InputStream)\n" +
"##\n", CopyUtils.toString(api));
}
}

View File

@ -0,0 +1,52 @@
package net.corda.plugins;
import org.gradle.testkit.runner.BuildResult;
import org.gradle.testkit.runner.BuildTask;
import org.gradle.testkit.runner.GradleRunner;
import static org.gradle.testkit.runner.TaskOutcome.*;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.*;
import static org.junit.Assert.*;
public class ExtendedInterfaceTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("extended-interface/build.gradle", buildFile);
}
@Test
public void testExtendedInterface() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
Path api = pathOf(testProjectDir, "build", "api", "extended-interface.txt");
assertThat(api).isRegularFile();
assertEquals(
"public interface net.corda.example.ExtendedInterface extends java.util.concurrent.Future\n" +
" public abstract String getName()\n" +
" public abstract void setName(String)\n" +
"##\n", CopyUtils.toString(api));
}
}

View File

@ -0,0 +1,55 @@
package net.corda.plugins;
import org.gradle.testkit.runner.BuildResult;
import org.gradle.testkit.runner.BuildTask;
import org.gradle.testkit.runner.GradleRunner;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.*;
import static org.gradle.testkit.runner.TaskOutcome.*;
import static org.junit.Assert.*;
public class FieldWithInternalAnnotationTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("field-internal-annotation/build.gradle", buildFile);
}
@Test
public void testFieldWithInternalAnnotations() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
assertThat(output)
.contains("net.corda.example.field.InvisibleAnnotation")
.contains("net.corda.example.field.LocalInvisibleAnnotation");
Path api = pathOf(testProjectDir, "build", "api", "field-internal-annotation.txt");
assertThat(api).isRegularFile();
assertEquals("public class net.corda.example.field.HasVisibleField extends java.lang.Object\n" +
" public <init>()\n" +
" public String hasInvisibleAnnotations\n" +
"##\n", CopyUtils.toString(api));
}
}

View File

@ -0,0 +1,52 @@
package net.corda.plugins;
import org.gradle.testkit.runner.BuildResult;
import org.gradle.testkit.runner.BuildTask;
import org.gradle.testkit.runner.GradleRunner;
import static org.gradle.testkit.runner.TaskOutcome.*;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.*;
import static org.junit.Assert.*;
public class InternalAnnotationTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("internal-annotation/build.gradle", buildFile);
}
@Test
public void testInternalAnnotations() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
assertThat(output)
.contains("net.corda.core.CordaInternal")
.contains("net.corda.example.CordaInternal");
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
Path api = pathOf(testProjectDir, "build", "api", "internal-annotation.txt");
assertThat(api).isRegularFile();
assertEquals("", CopyUtils.toString(api));
}
}

View File

@ -0,0 +1,51 @@
package net.corda.plugins;
import org.gradle.testkit.runner.BuildResult;
import org.gradle.testkit.runner.BuildTask;
import org.gradle.testkit.runner.GradleRunner;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.*;
import static org.gradle.testkit.runner.TaskOutcome.*;
import static org.junit.Assert.*;
public class InternalFieldTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("internal-field/build.gradle", buildFile);
}
@Test
public void testInternalField() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
Path api = pathOf(testProjectDir, "build", "api", "internal-field.txt");
assertThat(api).isRegularFile();
assertEquals(
"public class net.corda.example.WithInternalField extends java.lang.Object\n" +
" public <init>()\n" +
"##\n", CopyUtils.toString(api));
}
}

View File

@ -0,0 +1,50 @@
package net.corda.plugins;
import org.gradle.testkit.runner.BuildResult;
import org.gradle.testkit.runner.BuildTask;
import org.gradle.testkit.runner.GradleRunner;
import static org.gradle.testkit.runner.TaskOutcome.*;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.*;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.*;
import static org.junit.Assert.*;
public class InternalMethodTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("internal-method/build.gradle", buildFile);
}
@Test
public void testInternalMethod() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
Path api = pathOf(testProjectDir, "build", "api", "internal-method.txt");
assertThat(api).isRegularFile();
assertEquals(
"public class net.corda.example.WithInternalMethod extends java.lang.Object\n" +
" public <init>()\n" +
"##\n", CopyUtils.toString(api));
}
}

View File

@ -0,0 +1,53 @@
package net.corda.plugins;
import org.gradle.testkit.runner.BuildResult;
import org.gradle.testkit.runner.BuildTask;
import org.gradle.testkit.runner.GradleRunner;
import static org.gradle.testkit.runner.TaskOutcome.*;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.*;
import static org.junit.Assert.*;
public class InternalPackageTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("internal-package/build.gradle", buildFile);
}
@Test
public void testInternalPackageIsIgnored() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
assertThat(output).contains("net.corda.internal.InvisibleClass");
Path api = pathOf(testProjectDir, "build", "api", "internal-package.txt");
assertThat(api).isRegularFile();
assertEquals(
"public class net.corda.VisibleClass extends java.lang.Object\n" +
" public <init>()\n" +
"##\n", CopyUtils.toString(api));
}
}

View File

@ -0,0 +1,69 @@
package net.corda.plugins;
import org.gradle.testkit.runner.BuildResult;
import org.gradle.testkit.runner.BuildTask;
import org.gradle.testkit.runner.GradleRunner;
import static org.gradle.testkit.runner.TaskOutcome.*;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.*;
import static org.junit.Assert.*;
public class KotlinAnnotationsTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("kotlin-annotations/build.gradle", buildFile);
}
@Test
public void testKotlinAnnotations() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
Path api = pathOf(testProjectDir, "build", "api", "kotlin-annotations.txt");
assertThat(api).isRegularFile();
assertEquals(
"public final class net.corda.example.HasJvmField extends java.lang.Object\n" +
" public <init>()\n" +
" @org.jetbrains.annotations.NotNull public final String stringValue = \"Hello World\"\n" +
"##\n" +
"public final class net.corda.example.HasJvmStaticFunction extends java.lang.Object\n" +
" public <init>()\n" +
" @kotlin.jvm.JvmStatic public static final void doThing(String)\n" +
" public static final net.corda.example.HasJvmStaticFunction$Companion Companion\n" +
"##\n" +
"public static final class net.corda.example.HasJvmStaticFunction$Companion extends java.lang.Object\n" +
" @kotlin.jvm.JvmStatic public final void doThing(String)\n" +
"##\n" +
"public final class net.corda.example.HasOverloadedConstructor extends java.lang.Object\n" +
" public <init>()\n" +
" public <init>(String)\n" +
" public <init>(String, String)\n" +
" public <init>(String, String, int)\n" +
" @org.jetbrains.annotations.NotNull public final String getNotNullable()\n" +
" @org.jetbrains.annotations.Nullable public final String getNullable()\n" +
" public final int getNumber()\n" +
"##\n", CopyUtils.toString(api));
}
}

View File

@ -0,0 +1,53 @@
package net.corda.plugins;
import org.gradle.testkit.runner.BuildResult;
import org.gradle.testkit.runner.BuildTask;
import org.gradle.testkit.runner.GradleRunner;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.*;
import static org.gradle.testkit.runner.TaskOutcome.SUCCESS;
import static org.junit.Assert.*;
public class KotlinInternalAnnotationTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("kotlin-internal-annotation/build.gradle", buildFile);
}
@Test
public void testKotlinInternalAnnotation() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
assertThat(output).contains("net.corda.example.kotlin.CordaInternal");
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
Path api = pathOf(testProjectDir, "build", "api", "kotlin-internal-annotation.txt");
assertThat(api).isRegularFile();
assertEquals(
"public final class net.corda.example.kotlin.AnnotatedClass extends java.lang.Object\n" +
" public <init>()\n" +
"##\n", CopyUtils.toString(api));
}
}

View File

@ -0,0 +1,53 @@
package net.corda.plugins;
import org.gradle.testkit.runner.BuildResult;
import org.gradle.testkit.runner.BuildTask;
import org.gradle.testkit.runner.GradleRunner;
import static org.gradle.testkit.runner.TaskOutcome.*;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.*;
import static org.junit.Assert.*;
public class KotlinLambdasTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("kotlin-lambdas/build.gradle", buildFile);
}
@Test
public void testKotlinLambdas() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
assertThat(output).contains("net.corda.example.LambdaExpressions$testing$$inlined$schedule$1");
Path api = pathOf(testProjectDir, "build", "api", "kotlin-lambdas.txt");
assertThat(api).isRegularFile();
assertEquals("public final class net.corda.example.LambdaExpressions extends java.lang.Object\n" +
" public <init>()\n" +
" public final void testing(kotlin.Unit)\n" +
"##\n", CopyUtils.toString(api));
}
}

View File

@ -0,0 +1,48 @@
package net.corda.plugins;
import org.gradle.testkit.runner.*;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.*;
import static org.gradle.testkit.runner.TaskOutcome.SUCCESS;
import static org.junit.Assert.*;
public class KotlinVarargMethodTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("kotlin-vararg-method/build.gradle", buildFile);
}
@Test
public void testKotlinVarargMethod() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
Path api = pathOf(testProjectDir, "build", "api", "kotlin-vararg-method.txt");
assertThat(api).isRegularFile();
assertEquals("public interface net.corda.example.KotlinVarargMethod\n" +
" public abstract void action(Object...)\n" +
"##\n", CopyUtils.toString(api));
}
}

View File

@ -0,0 +1,55 @@
package net.corda.plugins;
import org.gradle.testkit.runner.BuildResult;
import org.gradle.testkit.runner.BuildTask;
import org.gradle.testkit.runner.GradleRunner;
import static org.gradle.testkit.runner.TaskOutcome.*;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.*;
import static org.junit.Assert.*;
public class MethodWithInternalAnnotationTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("method-internal-annotation/build.gradle", buildFile);
}
@Test
public void testMethodWithInternalAnnotations() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
assertThat(output)
.contains("net.corda.example.method.InvisibleAnnotation")
.contains("net.corda.example.method.LocalInvisibleAnnotation");
Path api = pathOf(testProjectDir, "build", "api", "method-internal-annotation.txt");
assertThat(api).isRegularFile();
assertEquals("public class net.corda.example.method.HasVisibleMethod extends java.lang.Object\n" +
" public <init>()\n" +
" public void hasInvisibleAnnotations()\n" +
"##\n", CopyUtils.toString(api));
}
}

View File

@ -0,0 +1,48 @@
package net.corda.plugins;
import org.gradle.testkit.runner.*;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import static net.corda.plugins.CopyUtils.*;
import static org.assertj.core.api.Assertions.assertThat;
import static org.gradle.testkit.runner.TaskOutcome.SUCCESS;
import static org.junit.Assert.*;
public class VarargMethodTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
@Before
public void setup() throws IOException {
File buildFile = testProjectDir.newFile("build.gradle");
copyResourceTo("vararg-method/build.gradle", buildFile);
}
@Test
public void testVarargMethod() throws IOException {
BuildResult result = GradleRunner.create()
.withProjectDir(testProjectDir.getRoot())
.withArguments(getGradleArgsForTasks("scanApi"))
.withPluginClasspath()
.build();
String output = result.getOutput();
System.out.println(output);
BuildTask scanApi = result.task(":scanApi");
assertNotNull(scanApi);
assertEquals(SUCCESS, scanApi.getOutcome());
Path api = pathOf(testProjectDir, "build", "api", "vararg-method.txt");
assertThat(api).isRegularFile();
assertEquals("public interface net.corda.example.VarargMethod\n" +
" public abstract void action(Object...)\n" +
"##\n", CopyUtils.toString(api));
}
}

View File

@ -0,0 +1,31 @@
plugins {
id 'java'
id 'net.corda.plugins.api-scanner'
}
description 'Test annotation inheritance across classes'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
java {
srcDir file("../resources/test/annotated-class/java")
}
}
}
dependencies {
compile files('../../annotations/build/libs/annotations.jar')
}
jar {
baseName = "annotated-class"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,14 @@
package net.corda.example;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, METHOD})
@Retention(CLASS)
@Inherited
public @interface AlsoInherited {
}

View File

@ -0,0 +1,9 @@
package net.corda.example;
import net.corda.annotation.*;
@NotInherited
@IsInherited
@AlsoInherited
public class HasInheritedAnnotation {
}

View File

@ -0,0 +1,4 @@
package net.corda.example;
public class InheritingAnnotations extends HasInheritedAnnotation {
}

View File

@ -0,0 +1,14 @@
package net.corda.example;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, METHOD})
@Retention(CLASS)
@Inherited
public @interface IsInherited {
}

View File

@ -0,0 +1,12 @@
package net.corda.example;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, METHOD})
@Retention(CLASS)
public @interface NotInherited {
}

View File

@ -0,0 +1,30 @@
plugins {
id 'java'
id 'net.corda.plugins.api-scanner'
}
description 'Test annotation behaviour for a field'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
java {
srcDir files(
"../resources/test/annotated-field/java",
"../resources/test/common-annotations/java"
)
}
}
}
jar {
baseName = "annotated-field"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,6 @@
package net.corda.example;
public class HasAnnotatedField {
@B @C @A
public static final String ANNOTATED_FIELD = "<string-value>";
}

View File

@ -0,0 +1,31 @@
plugins {
id 'java'
id 'net.corda.plugins.api-scanner'
}
description 'Test annotation inheritance across interfaces'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
java {
srcDir file("../resources/test/annotated-interface/java")
}
}
}
dependencies {
compile files('../../annotations/build/libs/annotations.jar')
}
jar {
baseName = "annotated-interface"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,14 @@
package net.corda.example;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, METHOD})
@Retention(CLASS)
@Inherited
public @interface AlsoInherited {
}

View File

@ -0,0 +1,9 @@
package net.corda.example;
import net.corda.annotation.*;
@NotInherited
@IsInherited
@AlsoInherited
public interface HasInheritedAnnotation {
}

View File

@ -0,0 +1,4 @@
package net.corda.example;
public interface InheritingAnnotations extends HasInheritedAnnotation {
}

View File

@ -0,0 +1,14 @@
package net.corda.example;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, METHOD})
@Retention(CLASS)
@Inherited
public @interface IsInherited {
}

View File

@ -0,0 +1,12 @@
package net.corda.example;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, METHOD})
@Retention(CLASS)
public @interface NotInherited {
}

View File

@ -0,0 +1,30 @@
plugins {
id 'java'
id 'net.corda.plugins.api-scanner'
}
description 'Test annotation behaviour for a method'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
java {
srcDir files(
"../resources/test/annotated-method/java",
"../resources/test/common-annotations/java"
)
}
}
}
jar {
baseName = "annotated-method"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,8 @@
package net.corda.example;
public class HasAnnotatedMethod {
@B @C @A
public void hasAnnotation() {
System.out.println("VISIBLE ANNOTATIONS");
}
}

View File

@ -0,0 +1,27 @@
plugins {
id 'java'
id 'net.corda.plugins.api-scanner'
}
description 'Test behaviour of a basic Java annotation'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
java {
srcDir file("../resources/test/basic-annotation/java")
}
}
}
jar {
baseName = "basic-annotation"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,12 @@
package net.corda.example;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, METHOD})
@Retention(CLASS)
public @interface BasicAnnotation {
}

View File

@ -0,0 +1,27 @@
plugins {
id 'java'
id 'net.corda.plugins.api-scanner'
}
description 'Test behaviour of a basic Java class'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
java {
srcDir file("../resources/test/basic-class/java")
}
}
}
jar {
baseName = "basic-class"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,13 @@
package net.corda.example;
public class BasicClass {
private final String name;
public BasicClass(String name) {
this.name = name;
}
public String getName() {
return name;
}
}

View File

@ -0,0 +1,27 @@
plugins {
id 'java'
id 'net.corda.plugins.api-scanner'
}
description 'Test behaviour of a basic Java interface'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
java {
srcDir file("../resources/test/basic-interface/java")
}
}
}
jar {
baseName = "basic-interface"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,7 @@
package net.corda.example;
import java.math.BigInteger;
public interface BasicInterface {
BigInteger getBigNumber();
}

View File

@ -0,0 +1,30 @@
plugins {
id 'java'
id 'net.corda.plugins.api-scanner'
}
description 'Test behaviour of internal annotations on classes'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
java {
srcDir files(
"../resources/test/class-internal-annotation/java",
"../resources/test/common-internal/java"
)
}
}
}
jar {
baseName = "class-internal-annotation"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,5 @@
package net.corda.example;
@InvisibleAnnotation
public class AnnotatedClass {
}

View File

@ -0,0 +1,14 @@
package net.corda.example;
import net.corda.core.CordaInternal;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, METHOD})
@Retention(CLASS)
@CordaInternal
public @interface InvisibleAnnotation {
}

View File

@ -0,0 +1,12 @@
package net.corda.example;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, METHOD, FIELD})
@Retention(CLASS)
public @interface A {
}

View File

@ -0,0 +1,12 @@
package net.corda.example;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, METHOD, FIELD})
@Retention(CLASS)
public @interface B {
}

View File

@ -0,0 +1,12 @@
package net.corda.example;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, METHOD, FIELD})
@Retention(CLASS)
public @interface C {
}

View File

@ -0,0 +1,12 @@
package net.corda.core;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, METHOD, FIELD})
@Retention(CLASS)
public @interface CordaInternal {
}

View File

@ -0,0 +1,27 @@
plugins {
id 'java'
id 'net.corda.plugins.api-scanner'
}
description 'Test behaviour of an extended Java class'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
java {
srcDir file("../resources/test/extended-class/java")
}
}
}
jar {
baseName = "extended-class"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,10 @@
package net.corda.example;
import java.io.InputStream;
import java.io.FilterInputStream;
public class ExtendedClass extends FilterInputStream {
public ExtendedClass(InputStream input) {
super(input);
}
}

View File

@ -0,0 +1,27 @@
plugins {
id 'java'
id 'net.corda.plugins.api-scanner'
}
description 'Test behaviour of an extended Java interface'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
java {
srcDir file("../resources/test/extended-interface/java")
}
}
}
jar {
baseName = "extended-interface"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,8 @@
package net.corda.example;
import java.util.concurrent.Future;
public interface ExtendedInterface<T> extends Future<T> {
String getName();
void setName(String name);
}

View File

@ -0,0 +1,30 @@
plugins {
id 'java'
id 'net.corda.plugins.api-scanner'
}
description 'Test behaviour of internal annotations on fields'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
java {
srcDir files(
"../resources/test/field-internal-annotation/java",
"../resources/test/common-internal/java"
)
}
}
}
jar {
baseName = "field-internal-annotation"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,12 @@
package net.corda.example.field;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, FIELD})
@Retention(CLASS)
public @interface CordaInternal {
}

View File

@ -0,0 +1,7 @@
package net.corda.example.field;
public class HasVisibleField {
@InvisibleAnnotation
@LocalInvisibleAnnotation
public String hasInvisibleAnnotations;
}

View File

@ -0,0 +1,14 @@
package net.corda.example.field;
import net.corda.core.CordaInternal;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, FIELD})
@Retention(CLASS)
@CordaInternal
public @interface InvisibleAnnotation {
}

View File

@ -0,0 +1,13 @@
package net.corda.example.field;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, FIELD})
@Retention(CLASS)
@CordaInternal
public @interface LocalInvisibleAnnotation {
}

View File

@ -0,0 +1,30 @@
plugins {
id 'java'
id 'net.corda.plugins.api-scanner'
}
description 'Test behaviour of @CordaInternal annotations'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
java {
srcDir files(
"../resources/test/internal-annotation/java",
"../resources/test/common-internal/java"
)
}
}
}
jar {
baseName = "internal-annotation"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,12 @@
package net.corda.example;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, METHOD})
@Retention(CLASS)
public @interface CordaInternal {
}

View File

@ -0,0 +1,30 @@
plugins {
id 'java'
id 'net.corda.plugins.api-scanner'
}
description 'Test behaviour of @CordaInternal annotation on fields'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
java {
srcDir files(
"../resources/test/internal-field/java",
"../resources/test/common-internal/java"
)
}
}
}
jar {
baseName = "internal-field"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,8 @@
package net.corda.example;
import net.corda.core.CordaInternal;
public class WithInternalField {
@CordaInternal
public static final String INTERNAL_FIELD = "<secret value>";
}

View File

@ -0,0 +1,30 @@
plugins {
id 'java'
id 'net.corda.plugins.api-scanner'
}
description 'Test behaviour of @CordaInternal annotation on methods'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
java {
srcDir files(
"../resources/test/internal-method/java",
"../resources/test/common-internal/java"
)
}
}
}
jar {
baseName = "internal-method"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,10 @@
package net.corda.example;
import net.corda.core.CordaInternal;
public class WithInternalMethod {
@CordaInternal
public void internalMethod() {
System.out.println("INTERNAL METHOD");
}
}

View File

@ -0,0 +1,27 @@
plugins {
id 'java'
id 'net.corda.plugins.api-scanner'
}
description 'Test behaviour of an internal package'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
java {
srcDir file("../resources/test/internal-package/java")
}
}
}
jar {
baseName = "internal-package"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,4 @@
package net.corda;
public class VisibleClass {
}

View File

@ -0,0 +1,13 @@
package net.corda.internal;
public class InvisibleClass {
private final String name;
public InvisibleClass(String name) {
this.name = name;
}
public String getName() {
return name;
}
}

View File

@ -0,0 +1,32 @@
plugins {
id 'net.corda.plugins.api-scanner'
id 'org.jetbrains.kotlin.jvm' version '$kotlin_version'
}
description 'Test appearance of Kotlin-specific annotations'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
kotlin {
srcDir file("../resources/test/kotlin-annotations/kotlin")
}
}
}
dependencies {
compile 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version'
compile 'org.jetbrains.kotlin:kotlin-reflect:$kotlin_version'
}
jar {
baseName = "kotlin-annotations"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,6 @@
package net.corda.example
class HasJvmField {
@JvmField
val stringValue = "Hello World"
}

View File

@ -0,0 +1,8 @@
package net.corda.example
class HasJvmStaticFunction {
companion object {
@JvmStatic
fun doThing(message: String) = println(message)
}
}

View File

@ -0,0 +1,7 @@
package net.corda.example
class HasOverloadedConstructor @JvmOverloads constructor (
val notNullable: String = "defaultName",
val nullable: String? = null,
val number: Int = 0
)

View File

@ -0,0 +1,32 @@
plugins {
id 'net.corda.plugins.api-scanner'
id 'org.jetbrains.kotlin.jvm' version '$kotlin_version'
}
description 'Test appearance of internal Corda annotations in Kotlin'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
kotlin {
srcDir file("../resources/test/kotlin-internal-annotation/kotlin")
}
}
}
dependencies {
compile 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version'
compile 'org.jetbrains.kotlin:kotlin-reflect:$kotlin_version'
}
jar {
baseName = "kotlin-internal-annotation"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,4 @@
package net.corda.example.kotlin
@InvisibleAnnotation
class AnnotatedClass

View File

@ -0,0 +1,8 @@
package net.corda.example.kotlin
import kotlin.annotation.AnnotationRetention.*
import kotlin.annotation.AnnotationTarget.*
@Target(FILE, CLASS, FUNCTION, ANNOTATION_CLASS)
@Retention(BINARY)
annotation class CordaInternal

View File

@ -0,0 +1,9 @@
package net.corda.example.kotlin
import kotlin.annotation.AnnotationRetention.*
import kotlin.annotation.AnnotationTarget.*
@Target(FILE, CLASS, FUNCTION)
@Retention(BINARY)
@CordaInternal
annotation class InvisibleAnnotation

View File

@ -0,0 +1,32 @@
plugins {
id 'net.corda.plugins.api-scanner'
id 'org.jetbrains.kotlin.jvm' version '$kotlin_version'
}
description 'Test appearance of Kotlin lambdas'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
kotlin {
srcDir file("../resources/test/kotlin-lambdas/kotlin")
}
}
}
dependencies {
compile 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version'
compile 'org.jetbrains.kotlin:kotlin-reflect:$kotlin_version'
}
jar {
baseName = "kotlin-lambdas"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,14 @@
package net.corda.example
import java.util.*
import kotlin.concurrent.schedule
class LambdaExpressions {
private val timer: Timer = Timer()
fun testing(block: Unit) {
timer.schedule(Random().nextLong()) {
block
}
}
}

View File

@ -0,0 +1,32 @@
plugins {
id 'net.corda.plugins.api-scanner'
id 'org.jetbrains.kotlin.jvm' version '$kotlin_version'
}
description 'Test appearance of Kotlin vararg functions'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
kotlin {
srcDir file("../resources/test/kotlin-vararg-method/kotlin")
}
}
}
dependencies {
compile 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version'
compile 'org.jetbrains.kotlin:kotlin-reflect:$kotlin_version'
}
jar {
baseName = "kotlin-vararg-method"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,5 @@
package net.corda.example
interface KotlinVarargMethod {
fun action(vararg arg: Any?)
}

View File

@ -0,0 +1,30 @@
plugins {
id 'java'
id 'net.corda.plugins.api-scanner'
}
description 'Test behaviour of internal annotations on methods'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
java {
srcDir files(
"../resources/test/method-internal-annotation/java",
"../resources/test/common-internal/java"
)
}
}
}
jar {
baseName = "method-internal-annotation"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,12 @@
package net.corda.example.method;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, METHOD})
@Retention(CLASS)
public @interface CordaInternal {
}

View File

@ -0,0 +1,9 @@
package net.corda.example.method;
public class HasVisibleMethod {
@InvisibleAnnotation
@LocalInvisibleAnnotation
public void hasInvisibleAnnotations() {
System.out.println("VISIBLE METHOD, INVISIBLE ANNOTATIONS");
}
}

View File

@ -0,0 +1,14 @@
package net.corda.example.method;
import net.corda.core.CordaInternal;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, METHOD})
@Retention(CLASS)
@CordaInternal
public @interface InvisibleAnnotation {
}

View File

@ -0,0 +1,13 @@
package net.corda.example.method;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, METHOD})
@Retention(CLASS)
@CordaInternal
public @interface LocalInvisibleAnnotation {
}

View File

@ -0,0 +1,27 @@
plugins {
id 'net.corda.plugins.api-scanner'
id 'java'
}
description 'Test appearance of Java vararg functions'
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
java {
srcDir file("../resources/test/vararg-method/java")
}
}
}
jar {
baseName = "vararg-method"
}
scanApi {
verbose = true
}

View File

@ -0,0 +1,5 @@
package net.corda.example;
public interface VarargMethod {
void action(Object... arg);
}

Some files were not shown because too many files have changed in this diff Show More