当前位置: 首页>>代码示例>>Java>>正文


Java Opcodes.ASM5属性代码示例

本文整理汇总了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;
}
 
开发者ID:baidu,项目名称:openrasp,代码行数:20,代码来源:OgnlHook.java

示例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;
}
 
开发者ID:baidu,项目名称:openrasp,代码行数:23,代码来源:ProxyDirContextHook.java

示例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));
}
 
开发者ID:ItzSomebody,项目名称:Spigot-Attribute-Remover,代码行数:10,代码来源:MethodNode.java

示例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();
            }
        }
    };
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:14,代码来源:ClientSidePayloadClassLoaderFactory.java

示例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;
}
 
开发者ID:baidu,项目名称:openrasp,代码行数:15,代码来源:SQLResultSetHook.java

示例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);
}
 
开发者ID:acmerli,项目名称:fastAOP,代码行数:9,代码来源:InstructionAdapter.java

示例7: StartSendImageDataMethodVisitor

public StartSendImageDataMethodVisitor(final @Nullable MethodVisitor mv) {
	super(Opcodes.ASM5, mv);
}
 
开发者ID:Team-Fruit,项目名称:McHeliPrivacyShield,代码行数:3,代码来源:MCH_MultiplayClientVisitor.java

示例8: SendScreenShotMethodVisitor

public SendScreenShotMethodVisitor(final @Nullable MethodVisitor mv) {
	super(Opcodes.ASM5, mv);
}
 
开发者ID:Team-Fruit,项目名称:McHeliPrivacyShield,代码行数:3,代码来源:MCH_MultiplayClientVisitor.java

示例9: CheckAnnotationAdapter

CheckAnnotationAdapter(final AnnotationVisitor av, final boolean named) {
    super(Opcodes.ASM5, av);
    this.named = named;
}
 
开发者ID:acmerli,项目名称:fastAOP,代码行数:4,代码来源:CheckAnnotationAdapter.java

示例10: ClassChecker

ClassChecker(Consumer<WrongLoggerUsage> wrongUsageCallback, Predicate<String> methodsToCheck) {
    super(Opcodes.ASM5);
    this.wrongUsageCallback = wrongUsageCallback;
    this.methodsToCheck = methodsToCheck;
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:5,代码来源:ESLoggerUsageChecker.java

示例11: SignatureWriter

/**
 * Constructs a new {@link SignatureWriter} object.
 */
public SignatureWriter() {
    super(Opcodes.ASM5);
}
 
开发者ID:acmerli,项目名称:fastAOP,代码行数:6,代码来源:SignatureWriter.java

示例12: RemappingFieldAdapter

public RemappingFieldAdapter(final FieldVisitor fv, final Remapper remapper) {
    this(Opcodes.ASM5, fv, remapper);
}
 
开发者ID:ItzSomebody,项目名称:DirectLeaks-AntiReleak-Remover,代码行数:3,代码来源:RemappingFieldAdapter.java

示例13: LineNumberAnnotationVisitor

LineNumberAnnotationVisitor() {
  super(Opcodes.ASM5);
}
 
开发者ID:maetrive,项目名称:businessworks,代码行数:3,代码来源:LineNumbers.java

示例14: AnnotationConstantsCollector

public AnnotationConstantsCollector(final AnnotationVisitor av,
        final ConstantPool cp) {
    super(Opcodes.ASM5, av);
    this.cp = cp;
}
 
开发者ID:acmerli,项目名称:fastAOP,代码行数:5,代码来源:AnnotationConstantsCollector.java

示例15: MethodRemapper

MethodRemapper(WrapperGenerator sr, MethodVisitor mv) {
    super(Opcodes.ASM5, mv);
    this.sr = sr;
}
 
开发者ID:OrionMinecraft,项目名称:Orion,代码行数:4,代码来源:ClassTransformerConverter.java


注:本文中的org.objectweb.asm.Opcodes.ASM5属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。