當前位置: 首頁>>代碼示例>>Java>>正文


Java Opcodes.ASM4屬性代碼示例

本文整理匯總了Java中org.objectweb.asm.Opcodes.ASM4屬性的典型用法代碼示例。如果您正苦於以下問題:Java Opcodes.ASM4屬性的具體用法?Java Opcodes.ASM4怎麽用?Java Opcodes.ASM4使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.objectweb.asm.Opcodes的用法示例。


在下文中一共展示了Opcodes.ASM4屬性的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: check

/**
 * Checks that this class node is compatible with the given ASM API version.
 * This methods checks that this node, and all its nodes recursively, do not
 * contain elements that were introduced in more recent versions of the ASM
 * API than the given version.
 * 
 * @param api
 *            an ASM API version. Must be one of {@link Opcodes#ASM4} or
 *            {@link Opcodes#ASM5}.
 */
public void check(final int api) {
    if (api == Opcodes.ASM4) {
        if (visibleTypeAnnotations != null
                && visibleTypeAnnotations.size() > 0) {
            throw new RuntimeException();
        }
        if (invisibleTypeAnnotations != null
                && invisibleTypeAnnotations.size() > 0) {
            throw new RuntimeException();
        }
        for (FieldNode f : fields) {
            f.check(api);
        }
        for (MethodNode m : methods) {
            m.check(api);
        }
    }
}
 
開發者ID:ItzSomebody,項目名稱:DirectLeaks-AntiReleak-Remover,代碼行數:28,代碼來源:ClassNode.java

示例2: check

/**
 * Checks that this field node is compatible with the given ASM API version.
 * This methods checks that this node, and all its nodes recursively, do not
 * contain elements that were introduced in more recent versions of the ASM
 * API than the given version.
 * 
 * @param api
 *            an ASM API version. Must be one of {@link Opcodes#ASM4} or
 *            {@link Opcodes#ASM5}.
 */
public void check(final int api) {
    if (api == Opcodes.ASM4) {
        if (visibleTypeAnnotations != null
                && visibleTypeAnnotations.size() > 0) {
            throw new RuntimeException();
        }
        if (invisibleTypeAnnotations != null
                && invisibleTypeAnnotations.size() > 0) {
            throw new RuntimeException();
        }
    }
}
 
開發者ID:ItzSomebody,項目名稱:Spigot-Nonce-ID-Finder,代碼行數:22,代碼來源:FieldNode.java

示例3: AsmMethodVisit

public AsmMethodVisit(MethodVisitor mv,String name,String name2) {       	
    super(Opcodes.ASM4, mv);   
    toName = name2;
    targetMethodname = name;
}
 
開發者ID:PluginsCDTribe,項目名稱:MCheatEngine,代碼行數:5,代碼來源:AsmMethodVisit.java

示例4: check

/**
 * Checks that this method node is compatible with the given ASM API
 * version. This methods checks that this node, and all its nodes
 * recursively, do not contain elements that were introduced in more recent
 * versions of the ASM API than the given version.
 * 
 * @param api
 *            an ASM API version. Must be one of {@link Opcodes#ASM4} or
 *            {@link Opcodes#ASM5}.
 */
public void check(final int api) {
    if (api == Opcodes.ASM4) {
        if (visibleTypeAnnotations != null
                && visibleTypeAnnotations.size() > 0) {
            throw new RuntimeException();
        }
        if (invisibleTypeAnnotations != null
                && invisibleTypeAnnotations.size() > 0) {
            throw new RuntimeException();
        }
        int n = tryCatchBlocks == null ? 0 : tryCatchBlocks.size();
        for (int i = 0; i < n; ++i) {
            TryCatchBlockNode tcb = tryCatchBlocks.get(i);
            if (tcb.visibleTypeAnnotations != null
                    && tcb.visibleTypeAnnotations.size() > 0) {
                throw new RuntimeException();
            }
            if (tcb.invisibleTypeAnnotations != null
                    && tcb.invisibleTypeAnnotations.size() > 0) {
                throw new RuntimeException();
            }
        }
        for (int i = 0; i < instructions.size(); ++i) {
            AbstractInsnNode insn = instructions.get(i);
            if (insn.visibleTypeAnnotations != null
                    && insn.visibleTypeAnnotations.size() > 0) {
                throw new RuntimeException();
            }
            if (insn.invisibleTypeAnnotations != null
                    && insn.invisibleTypeAnnotations.size() > 0) {
                throw new RuntimeException();
            }
            if (insn instanceof MethodInsnNode) {
                boolean itf = ((MethodInsnNode) insn).itf;
                if (itf != (insn.opcode == Opcodes.INVOKEINTERFACE)) {
                    throw new RuntimeException();
                }
            }
        }
        if (visibleLocalVariableAnnotations != null
                && visibleLocalVariableAnnotations.size() > 0) {
            throw new RuntimeException();
        }
        if (invisibleLocalVariableAnnotations != null
                && invisibleLocalVariableAnnotations.size() > 0) {
            throw new RuntimeException();
        }
    }
}
 
開發者ID:ItzSomebody,項目名稱:DirectLeaks-AntiReleak-Remover,代碼行數:59,代碼來源:MethodNode.java

示例5: CalledClassVisitor

CalledClassVisitor(Set<String> methods, Set<String> fields, boolean publicIndexation) {
	super(Opcodes.ASM4);
	this.methods = methods;
	this.fields = fields;
	this.publicIndexation = publicIndexation;
}
 
開發者ID:evernat,項目名稱:dead-code-detector,代碼行數:6,代碼來源:CalledClassVisitor.java

示例6: CallersClassVisitor

CallersClassVisitor(MethodVisitor methodVisitor) {
	super(Opcodes.ASM4);
	this.methodVisitor = methodVisitor;
}
 
開發者ID:evernat,項目名稱:dead-code-detector,代碼行數:4,代碼來源:CallersClassVisitor.java

示例7: Visitor

public Visitor()
{
	super(Opcodes.ASM4);
}
 
開發者ID:equella,項目名稱:Equella,代碼行數:4,代碼來源:ScannerModule.java

示例8: UselessInitMethodVisitor

UselessInitMethodVisitor() {
	super(Opcodes.ASM4);
}
 
開發者ID:evernat,項目名稱:dead-code-detector,代碼行數:3,代碼來源:UselessInitClassVisitor.java

示例9: MethodChangeClassAdapter

public MethodChangeClassAdapter(final ClassVisitor cv) {
    super(Opcodes.ASM4, cv);
}
 
開發者ID:alibaba,項目名稱:atlas,代碼行數:3,代碼來源:AsmExample.java

示例10: AsmMethodVisit

public AsmMethodVisit(MethodVisitor mv) {
    super(Opcodes.ASM4, mv);
}
 
開發者ID:alibaba,項目名稱:atlas,代碼行數:3,代碼來源:AsmExample.java

示例11: SignatureVisitor

/**
 * Constructs a new {@link SignatureVisitor}.
 * 
 * @param api
 *            the ASM API version implemented by this visitor. Must be one
 *            of {@link Opcodes#ASM4} or {@link Opcodes#ASM5}.
 */
public SignatureVisitor(final int api) {
    if (api != Opcodes.ASM4 && api != Opcodes.ASM5) {
        throw new IllegalArgumentException();
    }
    this.api = api;
}
 
開發者ID:ItzSomebody,項目名稱:Spigot-Attribute-Remover,代碼行數:13,代碼來源:SignatureVisitor.java


注:本文中的org.objectweb.asm.Opcodes.ASM4屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。