Example usage for org.objectweb.asm Opcodes ASM5

List of usage examples for org.objectweb.asm Opcodes ASM5

Introduction

In this page you can find the example usage for org.objectweb.asm Opcodes ASM5.

Prototype

int ASM5

To view the source code for org.objectweb.asm Opcodes ASM5.

Click Source Link

Usage

From source file:com.facebook.buck.jvm.java.abi.SourceAbiCompatibleVisitor.java

License:Apache License

public SourceAbiCompatibleVisitor(ClassVisitor cv) {
    super(Opcodes.ASM5, cv);
}

From source file:com.facebook.buck.jvm.java.abi.StubJarClassEntry.java

License:Apache License

@Nullable
public static StubJarClassEntry of(LibraryReader input, Path path, boolean sourceAbiCompatible)
        throws IOException {
    ClassNode stub = new ClassNode(Opcodes.ASM5);

    // As we read the class in, we create a partial stub that removes non-ABI methods and fields
    // but leaves the entire InnerClasses table. We record all classes that are referenced from
    // ABI methods and fields, and will use that information later to filter the InnerClasses table.
    ClassReferenceTracker referenceTracker = new ClassReferenceTracker(stub);
    ClassVisitor firstLevelFiltering = new AbiFilteringClassVisitor(referenceTracker);

    // If we want ABIs that are compatible with those generated from source, we add a visitor
    // at the very start of the chain which transforms the event stream coming out of `ClassNode`
    // to look like what ClassVisitorDriverFromElement would have produced.
    if (sourceAbiCompatible) {
        firstLevelFiltering = new SourceAbiCompatibleVisitor(firstLevelFiltering);
    }/*from w  w w . ja va2s  . com*/
    input.visitClass(path, firstLevelFiltering);

    // The synthetic package-info class is how package annotations are recorded; that one is
    // actually used by the compiler
    if (!isAnonymousOrLocalOrSyntheticClass(stub) || stub.name.endsWith("/package-info")) {
        return new StubJarClassEntry(path, stub, referenceTracker.getReferencedClassNames());
    }

    return null;
}

From source file:com.foxelbox.lowsecurity.patchsystem.ClassVisitorPatchSystem.java

License:Open Source License

public ClassVisitorPatchSystem(ClassVisitor classVisitor) {
    super(Opcodes.ASM5, classVisitor);
}

From source file:com.foxelbox.lowsecurity.replacecalls.ClassVisitorReplaceCalls.java

License:Open Source License

public ClassVisitorReplaceCalls(ClassVisitor classVisitor, String className) {
    super(Opcodes.ASM5, classVisitor);
    this.className = className;
}

From source file:com.foxelbox.spigotpatcher.ClassVisitorPatcher.java

License:Open Source License

ClassVisitorPatcher(ClassVisitor classVisitor, HashMap<String, MethodPatcher> methodPatchers) {
    super(Opcodes.ASM5, classVisitor);
    this.methodPatchers = methodPatchers;
}

From source file:com.foxelbox.spigotpatcher.patchers.GetOnlinePlayersPatcher.java

License:Open Source License

public GetOnlinePlayersPatcher(ClassVisitor classVisitor) {
    super(Opcodes.ASM5, classVisitor);
}

From source file:com.gargoylesoftware.js.nashorn.internal.ir.debug.NashornTextifier.java

License:Open Source License

/**
 * Constructs a new {@link NashornTextifier}. <i>Subclasses must not use this
 * constructor</i>. Instead, they must use the {@link #NashornTextifier(int)}
 * version.//from   w ww . j av  a 2 s .  com
 * @param env script environment
 * @param cr a customized classreader for gathering, among other things, label
 * information
 */
public NashornTextifier(final ScriptEnvironment env, final NashornClassReader cr) {
    this(Opcodes.ASM5);
    this.env = env;
    this.cr = cr;
}

From source file:com.geeksaga.light.profiler.asm.ClassNodeWrapper.java

License:Apache License

public ClassNodeWrapper() {
    this(Opcodes.ASM5);
}

From source file:com.geeksaga.light.profiler.asm.CodeSizeEvaluatorWrapper.java

License:Apache License

public CodeSizeEvaluatorWrapper(final MethodVisitor mv) {
    this(Opcodes.ASM5, mv);
}

From source file:com.geeksaga.light.profiler.asm.MethodWrapper.java

License:Apache License

public MethodWrapper(final MethodVisitor mv, ConstantPoolWrapper constantPool) {
    this(Opcodes.ASM5, mv, constantPool);
}