java.lang.Object
org.curioswitch.common.protobuf.json.bytebuddy.IfEqual
All Implemented Interfaces:
net.bytebuddy.implementation.bytecode.StackManipulation

public final class IfEqual extends Object implements net.bytebuddy.implementation.bytecode.StackManipulation
A StackManipulation which jumps to a destination if two items on the execution stack are equal. For reference types, there should only be a single boolean on the execution stack which is the result of Object.equals(Object).

Used for if-statements like

{code
   if (a != b) {
     ...
   }
   // destination
 }
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bytecode.StackManipulation

    net.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase, net.bytebuddy.implementation.bytecode.StackManipulation.Compound, net.bytebuddy.implementation.bytecode.StackManipulation.Illegal, net.bytebuddy.implementation.bytecode.StackManipulation.Simple, net.bytebuddy.implementation.bytecode.StackManipulation.Size, net.bytebuddy.implementation.bytecode.StackManipulation.Trivial
  • Constructor Summary

    Constructors
    Constructor
    Description
    IfEqual(Class<?> variableType, net.bytebuddy.jar.asm.Label destination)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.bytebuddy.implementation.bytecode.StackManipulation.Size
    apply(net.bytebuddy.jar.asm.MethodVisitor methodVisitor, net.bytebuddy.implementation.Implementation.Context implementationContext)
     
    boolean
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IfEqual

      public IfEqual(Class<?> variableType, net.bytebuddy.jar.asm.Label destination)
  • Method Details

    • isValid

      public boolean isValid()
      Specified by:
      isValid in interface net.bytebuddy.implementation.bytecode.StackManipulation
    • apply

      public net.bytebuddy.implementation.bytecode.StackManipulation.Size apply(net.bytebuddy.jar.asm.MethodVisitor methodVisitor, net.bytebuddy.implementation.Implementation.Context implementationContext)
      Specified by:
      apply in interface net.bytebuddy.implementation.bytecode.StackManipulation