writeUnlock(swapGenerator); swapGenerator.loadLocal(var); swapGenerator.throwException();
readUnlock(interceptedTargetVisitor); interceptedTargetVisitor.loadLocal(var); interceptedTargetVisitor.throwException();
/** See {@link GeneratorAdapter#throwException()} */ public void throwException() { adapter.throwException(); }
/** See {@link GeneratorAdapter#throwException(Type, String)} */ public void throwException(Type type, String msg) { adapter.throwException(type, msg); }
/** See {@link GeneratorAdapter#throwException()} */ public void throwException() { adapter.throwException(); }
/** See {@link GeneratorAdapter#throwException(Type, String)} */ public void throwException(Type type, String msg) { adapter.throwException(type, msg); }
@Override public void addMethod(ClassWriter cw, java.lang.reflect.Method method) { Method m = Method.getMethod(method); GeneratorAdapter mg = new GeneratorAdapter(Opcodes.ACC_PUBLIC, m, null, null, cw); mg.throwException(Type.getType(UnexpectedMethodCallException.class), getUnexpectedCallMessage(method)); mg.endMethod(); }
private static void generateNonAccessibleMethod(ClassVisitor cv, java.lang.reflect.Method m) throws Exception { String methodName = m.getName(); Type returnType = Type.getReturnType(m); Type[] argTypes = Type.getArgumentTypes(m); Method asmMethod = new Method(methodName, returnType, argTypes); // Only called for non-static Protected or Package access int access = ACC_PUBLIC; GeneratorAdapter mg = new GeneratorAdapter(access, asmMethod, null, getExceptionTypes(m), cv); mg.throwException(Type.getType(javax.ejb.EJBException.class), "Illegal non-business method access on no-interface view"); mg.returnValue(); mg.endMethod(); }
private static void generateNonAccessibleMethod(ClassVisitor cv, java.lang.reflect.Method m) throws Exception { String methodName = m.getName(); Type returnType = Type.getReturnType(m); Type[] argTypes = Type.getArgumentTypes(m); Method asmMethod = new Method(methodName, returnType, argTypes); // Only called for non-static Protected or Package access int access = ACC_PUBLIC; GeneratorAdapter mg = new GeneratorAdapter(access, asmMethod, null, getExceptionTypes(m), cv); mg.throwException(Type.getType(javax.ejb.EJBException.class), "Illegal non-business method access on no-interface view"); mg.returnValue(); mg.endMethod(); }
/** * Generates the instructions to create and throw an exception. The exception class must have a * constructor with a single String argument. * * @param type the class of the exception to be thrown. * @param message the detailed message of the exception. */ public void throwException(final Type type, final String message) { newInstance(type); dup(); push(message); invokeConstructor(type, Method.getMethod("void <init> (String)")); throwException(); }
/** * Generates the instructions to create and throw an exception. The exception class must have a * constructor with a single String argument. * * @param type the class of the exception to be thrown. * @param message the detailed message of the exception. */ public void throwException(final Type type, final String message) { newInstance(type); dup(); push(message); invokeConstructor(type, Method.getMethod("void <init> (String)")); throwException(); }
/** * Generates the instructions to create and throw an exception. The exception class must have a * constructor with a single String argument. * * @param type the class of the exception to be thrown. * @param message the detailed message of the exception. */ public void throwException(final Type type, final String message) { newInstance(type); dup(); push(message); invokeConstructor(type, Method.getMethod("void <init> (String)")); throwException(); }
/** * Generates the instructions to create and throw an exception. The * exception class must have a constructor with a single String argument. * * @param type * the class of the exception to be thrown. * @param msg * the detailed message of the exception. */ public void throwException(final Type type, final String msg) { newInstance(type); dup(); push(msg); invokeConstructor(type, Method.getMethod("void <init> (String)")); throwException(); }
Label hashEquals = mg.newLabel(); mg.ifZCmp(GeneratorAdapter.NE, hashEquals); mg.throwException(Type.getType(IllegalArgumentException.class), "Schema not match."); mg.mark(hashEquals);
@Override public void visitMaxs(int maxStack, int maxLocals) { if (isSynchronized) { mv.visitLabel(catchLabel); int throwableLocal = mv.newLocal(THROWABLE_TYPE); mv.storeLocal(throwableLocal); TrasformationUtils.wrapCodeToMakeItSafe(mv, () -> { loadSynchronizedMethodMonitorOwner(); invokeAfterMonitorExit(); }); mv.loadLocal(throwableLocal); mv.throwException(); } mv.visitMaxs(maxStack, maxLocals); }
mg.invokeStatic(Type.getType(Throwables.class), getMethod(RuntimeException.class, "propagate", Throwable.class)); mg.throwException(); mg.endMethod();
mg.invokeStatic(Type.getType(Throwables.class), getMethod(RuntimeException.class, "propagate", Throwable.class)); mg.throwException(); mg.endMethod();
mg.invokeStatic(Type.getType(Throwables.class), getMethod(RuntimeException.class, "propagate", Throwable.class)); mg.throwException(); mg.endMethod();
mg.invokeStatic(Type.getType(Throwables.class), getMethod(RuntimeException.class, "propagate", Throwable.class)); mg.throwException(); mg.mark(endCatch);
mv.invokeConstructor(INSTANT_RELOAD_EXCEPTION_TYPE, Method.getMethod("void <init> (String)")); mv.throwException();