类 ScriptChunk


  • public class ScriptChunk
    extends Object
    A script element that is either a entity push (signature, pubkey, etc) or a non-push (logic, numeric, etc) operation.
    • 字段详细资料

      • opcode

        public final int opcode
        Operation to be executed. Opcodes are defined in ScriptOpCodes.
      • data

        @Nullable
        public final byte[] data
        For push operations, this is the vector to be pushed on the stack. For ScriptOpCodes.OP_0, the vector is empty. Null for non-push operations.
    • 构造器详细资料

      • ScriptChunk

        public ScriptChunk​(int opcode,
                           byte[] data)
      • ScriptChunk

        public ScriptChunk​(int opcode,
                           byte[] data,
                           int startLocationInProgram)
    • 方法详细资料

      • equalsOpCode

        public boolean equalsOpCode​(int opcode)
      • isOpCode

        public boolean isOpCode()
        If this chunk is a single byte of non-pushdata content (could be OP_RESERVED or some invalid Opcode)
      • isPushData

        public boolean isPushData()
        Returns true if this chunk is pushdata content, including the single-byte pushdatas.
      • getStartLocationInProgram

        public int getStartLocationInProgram()
      • decodeOpN

        public int decodeOpN()
        If this chunk is an OP_N opcode returns the equivalent integer value.
      • isShortestPossiblePushData

        public boolean isShortestPossiblePushData()
        Called on a pushdata chunk, returns true if it uses the smallest possible way (according to BIP62) to push the entity.
      • hashCode

        public int hashCode()
        覆盖:
        hashCode 在类中 Object