// Generated by delombok at Sun Feb 26 12:31:38 KST 2017 package scouter.bytebuddy.implementation.bytecode.constant; import scouter.bytebuddy.implementation.Implementation; import scouter.bytebuddy.implementation.bytecode.StackManipulation; import scouter.bytebuddy.implementation.bytecode.StackSize; import scouter.bytebuddy.utility.JavaConstant; import scouter.bytebuddy.jar.asm.MethodVisitor; /** * A constant representing a {@link JavaConstant}. */ public class JavaConstantValue implements StackManipulation { /** * The instance to load onto the operand stack. */ private final JavaConstant javaConstant; /** * Creates a constant pool value representing a {@link JavaConstant}. * * @param javaConstant The instance to load onto the operand stack. */ public JavaConstantValue(JavaConstant javaConstant) { this.javaConstant = javaConstant; } @Override public boolean isValid() { return true; } @Override public Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext) { methodVisitor.visitLdcInsn(javaConstant.asConstantPoolValue()); return StackSize.SINGLE.toIncreasingSize(); } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof JavaConstantValue)) return false; final JavaConstantValue other = (JavaConstantValue) o; if (!other.canEqual((java.lang.Object) this)) return false; final java.lang.Object this$javaConstant = this.javaConstant; final java.lang.Object other$javaConstant = other.javaConstant; if (this$javaConstant == null ? other$javaConstant != null : !this$javaConstant.equals(other$javaConstant)) return false; return true; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") protected boolean canEqual(final java.lang.Object other) { return other instanceof JavaConstantValue; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public int hashCode() { final int PRIME = 59; int result = 1; final java.lang.Object $javaConstant = this.javaConstant; result = result * PRIME + ($javaConstant == null ? 43 : $javaConstant.hashCode()); return result; } }