當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。