ai.timefold.jpyinterpreter.opcodes.exceptions.LoadAssertionErrorOpcode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jpyinterpreter Show documentation
Show all versions of jpyinterpreter Show documentation
Timefold solves planning problems.
This lightweight, embeddable planning engine implements powerful and scalable algorithms
to optimize business resource scheduling and planning.
This module contains the Python interpreter.
The newest version!
package ai.timefold.jpyinterpreter.opcodes.exceptions;
import ai.timefold.jpyinterpreter.FunctionMetadata;
import ai.timefold.jpyinterpreter.PythonBytecodeInstruction;
import ai.timefold.jpyinterpreter.StackMetadata;
import ai.timefold.jpyinterpreter.ValueSourceInfo;
import ai.timefold.jpyinterpreter.implementors.ExceptionImplementor;
import ai.timefold.jpyinterpreter.opcodes.AbstractOpcode;
import ai.timefold.jpyinterpreter.types.errors.PythonAssertionError;
public class LoadAssertionErrorOpcode extends AbstractOpcode {
public LoadAssertionErrorOpcode(PythonBytecodeInstruction instruction) {
super(instruction);
}
@Override
protected StackMetadata getStackMetadataAfterInstruction(FunctionMetadata functionMetadata, StackMetadata stackMetadata) {
return stackMetadata.push(ValueSourceInfo.of(this, PythonAssertionError.ASSERTION_ERROR_TYPE));
}
@Override
public void implement(FunctionMetadata functionMetadata, StackMetadata stackMetadata) {
ExceptionImplementor.createAssertionError(functionMetadata.methodVisitor);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy