Record Class Misc.TryCatchBlock<T extends Throwable,N extends Emitter.Next>

java.lang.Object
java.lang.Record
ghidra.pcode.emu.jit.gen.util.Misc.TryCatchBlock<T,N>
Type Parameters:
T - the type caught by the block
N - the stack contents at the start and end of the try block
Record Components:
end - the label to place at the end of the try block
handler - the label to place at the handler, i.e., the start of the catch block. Note that the stack is the same as the block bounds, but with the exception type pushed. FIXME: Is that fully correct? Do we know what's actually underneath the exception?
em - the emitter at the start of the try block
Enclosing interface:
Misc

public static record Misc.TryCatchBlock<T extends Throwable,N extends Emitter.Next>(Lbl<N extends Emitter.Next> end, Lbl<Emitter.Ent<N extends Emitter.Next,Types.TRef<T extends Throwable>>> handler, Emitter<N extends Emitter.Next> em) extends Record
A handle to an (incomplete) try-catch block
  • Constructor Details

    • TryCatchBlock

      public TryCatchBlock(Lbl<N> end, Lbl<Emitter.Ent<N,Types.TRef<T>>> handler, Emitter<N> em)
      Creates an instance of a TryCatchBlock record class.
      Parameters:
      end - the value for the end record component
      handler - the value for the handler record component
      em - the value for the em record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • end

      public Lbl<N> end()
      Returns the value of the end record component.
      Returns:
      the value of the end record component
    • handler

      public Lbl<Emitter.Ent<N,Types.TRef<T>>> handler()
      Returns the value of the handler record component.
      Returns:
      the value of the handler record component
    • em

      public Emitter<N> em()
      Returns the value of the em record component.
      Returns:
      the value of the em record component