Class ContractCodeCostInputs

java.lang.Object
org.stellar.sdk.xdr.ContractCodeCostInputs
All Implemented Interfaces:
XdrElement

public class ContractCodeCostInputs extends Object implements XdrElement
ContractCodeCostInputs's original definition in the XDR file is:
 struct ContractCodeCostInputs {
     ExtensionPoint ext;
     uint32 nInstructions;
     uint32 nFunctions;
     uint32 nGlobals;
     uint32 nTableEntries;
     uint32 nTypes;
     uint32 nDataSegments;
     uint32 nElemSegments;
     uint32 nImports;
     uint32 nExports;
     uint32 nDataSegmentBytes;
 };
 
  • Constructor Details

    • ContractCodeCostInputs

      public ContractCodeCostInputs()
    • ContractCodeCostInputs

      public ContractCodeCostInputs(ExtensionPoint ext, Uint32 nInstructions, Uint32 nFunctions, Uint32 nGlobals, Uint32 nTableEntries, Uint32 nTypes, Uint32 nDataSegments, Uint32 nElemSegments, Uint32 nImports, Uint32 nExports, Uint32 nDataSegmentBytes)
      Creates a new ContractCodeCostInputs instance.
      Parameters:
      ext - the ext field value
      nInstructions - the nInstructions field value
      nFunctions - the nFunctions field value
      nGlobals - the nGlobals field value
      nTableEntries - the nTableEntries field value
      nTypes - the nTypes field value
      nDataSegments - the nDataSegments field value
      nElemSegments - the nElemSegments field value
      nImports - the nImports field value
      nExports - the nExports field value
      nDataSegmentBytes - the nDataSegmentBytes field value
  • Method Details

    • encode

      public void encode(XdrDataOutputStream stream) throws IOException
      Description copied from interface: XdrElement
      Encodes this value to XDR and writes it to the provided stream.
      Specified by:
      encode in interface XdrElement
      Parameters:
      stream - the destination XDR output stream
      Throws:
      IOException - if an I/O error occurs while writing the value
    • decode

      public static ContractCodeCostInputs decode(XdrDataInputStream stream, int maxDepth) throws IOException
      Throws:
      IOException
    • decode

      public static ContractCodeCostInputs decode(XdrDataInputStream stream) throws IOException
      Throws:
      IOException
    • fromXdrBase64

      public static ContractCodeCostInputs fromXdrBase64(String xdr) throws IOException
      Throws:
      IOException
    • fromXdrByteArray

      public static ContractCodeCostInputs fromXdrByteArray(byte[] xdr) throws IOException
      Throws:
      IOException
    • toJson

      public String toJson()
      Description copied from interface: XdrElement
      Serializes this value to JSON.
      Specified by:
      toJson in interface XdrElement
      Returns:
      the JSON representation of this value
    • fromJson

      public static ContractCodeCostInputs fromJson(String json)
    • builder

    • toBuilder

    • getExt

      public ExtensionPoint getExt()
      Value of the ext field.
      Returns:
      the ext field value
    • getNInstructions

      public Uint32 getNInstructions()
      Value of the nInstructions field.
      Returns:
      the nInstructions field value
    • getNFunctions

      public Uint32 getNFunctions()
      Value of the nFunctions field.
      Returns:
      the nFunctions field value
    • getNGlobals

      public Uint32 getNGlobals()
      Value of the nGlobals field.
      Returns:
      the nGlobals field value
    • getNTableEntries

      public Uint32 getNTableEntries()
      Value of the nTableEntries field.
      Returns:
      the nTableEntries field value
    • getNTypes

      public Uint32 getNTypes()
      Value of the nTypes field.
      Returns:
      the nTypes field value
    • getNDataSegments

      public Uint32 getNDataSegments()
      Value of the nDataSegments field.
      Returns:
      the nDataSegments field value
    • getNElemSegments

      public Uint32 getNElemSegments()
      Value of the nElemSegments field.
      Returns:
      the nElemSegments field value
    • getNImports

      public Uint32 getNImports()
      Value of the nImports field.
      Returns:
      the nImports field value
    • getNExports

      public Uint32 getNExports()
      Value of the nExports field.
      Returns:
      the nExports field value
    • getNDataSegmentBytes

      public Uint32 getNDataSegmentBytes()
      Value of the nDataSegmentBytes field.
      Returns:
      the nDataSegmentBytes field value
    • setExt

      public void setExt(ExtensionPoint ext)
      Value of the ext field.
      Parameters:
      ext - the ext field value
    • setNInstructions

      public void setNInstructions(Uint32 nInstructions)
      Value of the nInstructions field.
      Parameters:
      nInstructions - the nInstructions field value
    • setNFunctions

      public void setNFunctions(Uint32 nFunctions)
      Value of the nFunctions field.
      Parameters:
      nFunctions - the nFunctions field value
    • setNGlobals

      public void setNGlobals(Uint32 nGlobals)
      Value of the nGlobals field.
      Parameters:
      nGlobals - the nGlobals field value
    • setNTableEntries

      public void setNTableEntries(Uint32 nTableEntries)
      Value of the nTableEntries field.
      Parameters:
      nTableEntries - the nTableEntries field value
    • setNTypes

      public void setNTypes(Uint32 nTypes)
      Value of the nTypes field.
      Parameters:
      nTypes - the nTypes field value
    • setNDataSegments

      public void setNDataSegments(Uint32 nDataSegments)
      Value of the nDataSegments field.
      Parameters:
      nDataSegments - the nDataSegments field value
    • setNElemSegments

      public void setNElemSegments(Uint32 nElemSegments)
      Value of the nElemSegments field.
      Parameters:
      nElemSegments - the nElemSegments field value
    • setNImports

      public void setNImports(Uint32 nImports)
      Value of the nImports field.
      Parameters:
      nImports - the nImports field value
    • setNExports

      public void setNExports(Uint32 nExports)
      Value of the nExports field.
      Parameters:
      nExports - the nExports field value
    • setNDataSegmentBytes

      public void setNDataSegmentBytes(Uint32 nDataSegmentBytes)
      Value of the nDataSegmentBytes field.
      Parameters:
      nDataSegmentBytes - the nDataSegmentBytes field value
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object