net.bytebuddy.implementation.bytecode.Throw Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of byte-buddy-dep Show documentation
Show all versions of byte-buddy-dep Show documentation
Byte Buddy is a Java library for creating Java classes at run time.
This artifact is a build of Byte Buddy with a remaining dependency onto ASM.
You should never depend on this module without repackaging Byte Buddy and ASM into your own namespace.
package net.bytebuddy.implementation.bytecode;
import net.bytebuddy.implementation.Implementation;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
/**
* Throws a {@link java.lang.Throwable} which must lie on top of the stack when this stack manipulation is called.
*/
public enum Throw implements StackManipulation {
/**
* The singleton instance.
*/
INSTANCE;
@Override
public boolean isValid() {
return true;
}
@Override
public Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext) {
methodVisitor.visitInsn(Opcodes.ATHROW);
return StackSize.SINGLE.toDecreasingSize();
}
@Override
public String toString() {
return "Throw." + name();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy