All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.provenance.scope.contract.proto.Extensions.kt Maven / Gradle / Ivy

Go to download

A collection of libraries that interact and run Provenance Java based contracts.

There is a newer version: 0.7.0
Show newest version
// package io.provenance.scope.contract.proto

// import com.google.protobuf.DescriptorProtos
// import com.google.protobuf.GeneratedMessage
// import com.google.protobuf.ProtocolMessageEnum
// import io.provenance.scope.contract.proto.ContractScope.Envelope.Status

// /**
//  * Get enum description for a status value.
//  */
// fun Status.getDescription(): String {
//     return getExtension(ContractScope.description)
// }

// /**
//  * com.google.protobuf.ProtocolMessageEnum -> String Description
//  */
// fun  ProtocolMessageEnum.getExtension(extension: GeneratedMessage.GeneratedExtension): T {
//     try {
//         return valueDescriptor.options.getExtension(extension)
//     } catch (e: ArrayIndexOutOfBoundsException) {
//         throw IllegalArgumentException("${javaClass.name}.$this missing extension [(${extension.descriptor.name}) = ???]. Try filtering it out")
//     }
// }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy