当前位置: 首页>>代码示例>>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;未经允许,请勿转载。