This commit is contained in:
@@ -17,6 +17,7 @@ import java.nio.*;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.*;
|
import java.util.concurrent.*;
|
||||||
import jdk.internal.org.objectweb.asm.*;
|
import jdk.internal.org.objectweb.asm.*;
|
||||||
|
import static jdk.internal.org.objectweb.asm.ClassWriter.COMPUTE_FRAMES;
|
||||||
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -191,7 +192,7 @@ public abstract class BasedHttpServlet extends HttpServlet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
ClassWriter cw = new ClassWriter(0);
|
ClassWriter cw = new ClassWriter(COMPUTE_FRAMES);
|
||||||
FieldVisitor fv;
|
FieldVisitor fv;
|
||||||
MethodVisitor mv;
|
MethodVisitor mv;
|
||||||
AnnotationVisitor av0;
|
AnnotationVisitor av0;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import java.util.function.*;
|
|||||||
import java.util.logging.*;
|
import java.util.logging.*;
|
||||||
import javax.annotation.*;
|
import javax.annotation.*;
|
||||||
import jdk.internal.org.objectweb.asm.*;
|
import jdk.internal.org.objectweb.asm.*;
|
||||||
|
import static jdk.internal.org.objectweb.asm.ClassWriter.COMPUTE_FRAMES;
|
||||||
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||||
import jdk.internal.org.objectweb.asm.Type;
|
import jdk.internal.org.objectweb.asm.Type;
|
||||||
import org.redkale.convert.bson.*;
|
import org.redkale.convert.bson.*;
|
||||||
@@ -24,7 +25,7 @@ import org.redkale.service.DynCall;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* 详情见: http://redkale.org
|
* 详情见: http://redkale.org
|
||||||
*
|
*
|
||||||
* @author zhangjx
|
* @author zhangjx
|
||||||
@@ -161,14 +162,14 @@ public final class SncpDynServlet extends SncpServlet {
|
|||||||
* <blockquote><pre>
|
* <blockquote><pre>
|
||||||
* public class TestService implements Service {
|
* public class TestService implements Service {
|
||||||
* public boolean change(TestBean bean, String name, int id) {
|
* public boolean change(TestBean bean, String name, int id) {
|
||||||
*
|
*
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* public class DynActionTestService_change extends SncpServletAction {
|
* public class DynActionTestService_change extends SncpServletAction {
|
||||||
*
|
*
|
||||||
* public TestService service;
|
* public TestService service;
|
||||||
*
|
*
|
||||||
* @Override
|
* @Override
|
||||||
* public void action(final BsonReader in, final BsonWriter out) throws Throwable {
|
* public void action(final BsonReader in, final BsonWriter out) throws Throwable {
|
||||||
* TestBean arg1 = convert.convertFrom(paramTypes[1], in);
|
* TestBean arg1 = convert.convertFrom(paramTypes[1], in);
|
||||||
@@ -181,9 +182,9 @@ public final class SncpDynServlet extends SncpServlet {
|
|||||||
* }
|
* }
|
||||||
* </pre></blockquote>
|
* </pre></blockquote>
|
||||||
*
|
*
|
||||||
* @param service Service
|
* @param service Service
|
||||||
* @param actionid 操作ID
|
* @param actionid 操作ID
|
||||||
* @param method 方法
|
* @param method 方法
|
||||||
*
|
*
|
||||||
* @return SncpServletAction
|
* @return SncpServletAction
|
||||||
*/
|
*/
|
||||||
@@ -207,7 +208,7 @@ public final class SncpDynServlet extends SncpServlet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
ClassWriter cw = new ClassWriter(0);
|
ClassWriter cw = new ClassWriter(COMPUTE_FRAMES);
|
||||||
FieldVisitor fv;
|
FieldVisitor fv;
|
||||||
AsmMethodVisitor mv;
|
AsmMethodVisitor mv;
|
||||||
|
|
||||||
@@ -371,9 +372,8 @@ public final class SncpDynServlet extends SncpServlet {
|
|||||||
mv.visitMethodInsn(INVOKEVIRTUAL, convertName, "convertTo", "(" + convertWriterDesc + "Ljava/lang/reflect/Type;Ljava/lang/Object;)V", false);
|
mv.visitMethodInsn(INVOKEVIRTUAL, convertName, "convertTo", "(" + convertWriterDesc + "Ljava/lang/reflect/Type;Ljava/lang/Object;)V", false);
|
||||||
mv.visitInsn(RETURN);
|
mv.visitInsn(RETURN);
|
||||||
store++;
|
store++;
|
||||||
if (maxStack < 10) maxStack = 10;
|
|
||||||
}
|
}
|
||||||
mv.visitMaxs(maxStack + 10, store + 10);
|
mv.visitMaxs(maxStack, store);
|
||||||
mv.visitEnd();
|
mv.visitEnd();
|
||||||
}
|
}
|
||||||
cw.visitEnd();
|
cw.visitEnd();
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ package org.redkale.util;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.*;
|
import java.util.function.*;
|
||||||
import jdk.internal.org.objectweb.asm.*;
|
import jdk.internal.org.objectweb.asm.*;
|
||||||
|
import static jdk.internal.org.objectweb.asm.ClassWriter.COMPUTE_FRAMES;
|
||||||
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -442,7 +443,7 @@ public interface Attribute<T, F> {
|
|||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
}
|
}
|
||||||
//---------------------------------------------------
|
//---------------------------------------------------
|
||||||
final ClassWriter cw = new ClassWriter(0);
|
final ClassWriter cw = new ClassWriter(COMPUTE_FRAMES);
|
||||||
MethodVisitor mv;
|
MethodVisitor mv;
|
||||||
|
|
||||||
cw.visit(V1_8, ACC_PUBLIC + ACC_FINAL + ACC_SUPER, newDynName, "Ljava/lang/Object;L" + supDynName + "<" + interDesc + columnDesc + ">;", "java/lang/Object", new String[]{supDynName});
|
cw.visit(V1_8, ACC_PUBLIC + ACC_FINAL + ACC_SUPER, newDynName, "Ljava/lang/Object;L" + supDynName + "<" + interDesc + columnDesc + ">;", "java/lang/Object", new String[]{supDynName});
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import java.lang.reflect.Modifier;
|
|||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||||
import jdk.internal.org.objectweb.asm.*;
|
import jdk.internal.org.objectweb.asm.*;
|
||||||
|
import static jdk.internal.org.objectweb.asm.ClassWriter.COMPUTE_FRAMES;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -41,7 +42,7 @@ public interface Reproduce<D, S> {
|
|||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
ClassWriter cw = new ClassWriter(0);
|
ClassWriter cw = new ClassWriter(COMPUTE_FRAMES);
|
||||||
FieldVisitor fv;
|
FieldVisitor fv;
|
||||||
MethodVisitor mv;
|
MethodVisitor mv;
|
||||||
AnnotationVisitor av0;
|
AnnotationVisitor av0;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import java.lang.reflect.Type;
|
|||||||
import java.lang.reflect.*;
|
import java.lang.reflect.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import jdk.internal.org.objectweb.asm.*;
|
import jdk.internal.org.objectweb.asm.*;
|
||||||
|
import static jdk.internal.org.objectweb.asm.ClassWriter.COMPUTE_FRAMES;
|
||||||
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -139,7 +140,7 @@ public abstract class TypeToken<T> {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ClassWriter cw = new ClassWriter(0);
|
ClassWriter cw = new ClassWriter(COMPUTE_FRAMES);
|
||||||
FieldVisitor fv;
|
FieldVisitor fv;
|
||||||
MethodVisitor mv;
|
MethodVisitor mv;
|
||||||
cw.visit(V1_8, ACC_PUBLIC + ACC_FINAL + ACC_SUPER, newDynName, null, "java/lang/Object", null);
|
cw.visit(V1_8, ACC_PUBLIC + ACC_FINAL + ACC_SUPER, newDynName, null, "java/lang/Object", null);
|
||||||
|
|||||||
Reference in New Issue
Block a user