本文整理汇总了Java中org.objectweb.asm.Opcodes.ASM5属性的典型用法代码示例。如果您正苦于以下问题:Java Opcodes.ASM5属性的具体用法?Java Opcodes.ASM5怎么用?Java Opcodes.ASM5使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.objectweb.asm.Opcodes
的用法示例。
在下文中一共展示了Opcodes.ASM5属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: hookMethod
/**
* (none-javadoc)
*
* @see com.fuxi.javaagent.hook.AbstractClassHook#hookMethod(int, String, String, String, String[], MethodVisitor)
*/
@Override
protected MethodVisitor hookMethod(int access, String name, String desc,
String signature, String[] exceptions, MethodVisitor mv) {
if ("parseExpression".equals(name) && "(Ljava/lang/String;)Ljava/lang/Object;".equals(desc)) {
return new AdviceAdapter(Opcodes.ASM5, mv, access, name, desc) {
@Override
protected void onMethodEnter() {
loadArg(0);
invokeStatic(Type.getType(OgnlHook.class),
new Method("checkOgnlExpression", "(Ljava/lang/String;)V"));
}
};
}
return mv;
}
示例2: hookMethod
/**
* (none-javadoc)
*
* @see AbstractClassHook#hookMethod(int, String, String, String, String[], MethodVisitor)
*/
@Override
protected MethodVisitor hookMethod(int access, String name, String desc, String signature, String[] exceptions, MethodVisitor mv) {
if ("lookup".equals(name) && desc.startsWith("(Ljava/lang/String;)")) {
return new AdviceAdapter(Opcodes.ASM5, mv, access, name, desc) {
@Override
public void onMethodExit(int opcode) {
if (opcode == Opcodes.ARETURN) {
mv.visitVarInsn(ALOAD, 2);
mv.visitMethodInsn(INVOKESTATIC, "com/fuxi/javaagent/hook/ProxyDirContextHook", "checkResourceCacheEntry",
"(Ljava/lang/Object;)V", false);
}
super.onMethodExit(opcode);
}
};
}
return mv;
}
示例3: visitMethodInsn
@Deprecated
@Override
public void visitMethodInsn(int opcode, String owner, String name,
String desc) {
if (api >= Opcodes.ASM5) {
super.visitMethodInsn(opcode, owner, name, desc);
return;
}
instructions.add(new MethodInsnNode(opcode, owner, name, desc));
}
示例4: visitAnnotation
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
if (desc.equals(ANNOTATION_DESCRIPTOR)) {
found = true;
}
return new AnnotationVisitor(Opcodes.ASM5) {
@Override
public void visit(String name, Object value) {
if (name.equals("value")) {
interfaceName = value.toString();
}
}
};
}
示例5: hookMethod
@Override
protected MethodVisitor hookMethod(int access, String name, String desc, String signature, String[] exceptions, MethodVisitor mv) {
if (name.equals("next") && desc.equals("()Z") && Arrays.equals(exceptions, this.exceptions)) {
return new AdviceAdapter(Opcodes.ASM5, mv, access, name, desc) {
@Override
protected void onMethodEnter() {
push(type);
loadThis();
invokeStatic(Type.getType(SQLResultSetHook.class),
new Method("checkSqlQueryResult", "(Ljava/lang/String;Ljava/lang/Object;)V"));
}
};
}
return mv;
}
示例6: invokestatic
@Deprecated
public void invokestatic(final String owner, final String name,
final String desc) {
if (api >= Opcodes.ASM5) {
invokestatic(owner, name, desc, false);
return;
}
mv.visitMethodInsn(Opcodes.INVOKESTATIC, owner, name, desc, false);
}
示例7: StartSendImageDataMethodVisitor
public StartSendImageDataMethodVisitor(final @Nullable MethodVisitor mv) {
super(Opcodes.ASM5, mv);
}
示例8: SendScreenShotMethodVisitor
public SendScreenShotMethodVisitor(final @Nullable MethodVisitor mv) {
super(Opcodes.ASM5, mv);
}
示例9: CheckAnnotationAdapter
CheckAnnotationAdapter(final AnnotationVisitor av, final boolean named) {
super(Opcodes.ASM5, av);
this.named = named;
}
示例10: ClassChecker
ClassChecker(Consumer<WrongLoggerUsage> wrongUsageCallback, Predicate<String> methodsToCheck) {
super(Opcodes.ASM5);
this.wrongUsageCallback = wrongUsageCallback;
this.methodsToCheck = methodsToCheck;
}
示例11: SignatureWriter
/**
* Constructs a new {@link SignatureWriter} object.
*/
public SignatureWriter() {
super(Opcodes.ASM5);
}
示例12: RemappingFieldAdapter
public RemappingFieldAdapter(final FieldVisitor fv, final Remapper remapper) {
this(Opcodes.ASM5, fv, remapper);
}
示例13: LineNumberAnnotationVisitor
LineNumberAnnotationVisitor() {
super(Opcodes.ASM5);
}
示例14: AnnotationConstantsCollector
public AnnotationConstantsCollector(final AnnotationVisitor av,
final ConstantPool cp) {
super(Opcodes.ASM5, av);
this.cp = cp;
}
示例15: MethodRemapper
MethodRemapper(WrapperGenerator sr, MethodVisitor mv) {
super(Opcodes.ASM5, mv);
this.sr = sr;
}