All Downloads are FREE. Search and download functionalities are using the official Maven repository.

proguard.classfile.exception.NegativeStackSizeException Maven / Gradle / Ivy

Go to download

ProGuardCORE is a free library to read, analyze, modify, and write Java class files.

There is a newer version: 9.1.6
Show newest version
package proguard.classfile.exception;

import proguard.classfile.Clazz;
import proguard.classfile.Method;
import proguard.classfile.instruction.Instruction;
import proguard.exception.ErrorId;
import proguard.exception.ProguardCoreException;

public class NegativeStackSizeException extends ProguardCoreException {
  private final Clazz clazz;
  private final Method method;
  private final Instruction instruction;
  private final int instructionOffset;

  public NegativeStackSizeException(
      Clazz clazz, Method method, Instruction instruction, int instructionOffset) {
    super(
        ErrorId.NEGATIVE_STACK_SIZE,
        "Stack size becomes negative after instruction %s in [%s.%s%s]",
        instruction.toString(clazz, instructionOffset),
        clazz.getName(),
        method.getName(clazz),
        method.getDescriptor(clazz));
    this.clazz = clazz;
    this.method = method;
    this.instruction = instruction;
    this.instructionOffset = instructionOffset;
  }

  public Clazz getClazz() {
    return clazz;
  }

  public Method getMethod() {
    return method;
  }

  public Instruction getInstruction() {
    return instruction;
  }

  public int getInstructionOffset() {
    return instructionOffset;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy