Annotation Type Contract


  • @Retention(RUNTIME)
    @Target(TYPE)
    public @interface Contract
    Class level annotation that identifies this class as being a contract. Can supply information and an alternative name for the contract rather than the classname
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      Info info
      The Info object can be supplied to provide additional information about the contract.
      java.lang.String name
      Contract name.
      java.lang.String transactionSerializer
      Transaction Serializer Classname.
    • Element Detail

      • info

        Info info
        The Info object can be supplied to provide additional information about the contract. Including title, description, version and license
        Returns:
        Info object
        Default:
        @org.hyperledger.fabric.contract.annotation.Info
      • name

        java.lang.String name
        Contract name. Normally the name of the class is used to refer to the contract (name without package). This can be altered if wished.
        Returns:
        Name of the contract to be used instead of the Classname
        Default:
        ""
      • transactionSerializer

        java.lang.String transactionSerializer
        Transaction Serializer Classname. Fully Qualified Classname of the TRANSACTION serializer that should be used with this contract. This is the serializer that is used to parse incoming transaction request parameters and convert the return type
        Returns:
        Default serializer classname
        Default:
        "org.hyperledger.fabric.contract.execution.JSONTransactionSerializer"