Example usage for org.objectweb.asm Opcodes ASM6

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

Introduction

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

Prototype

int ASM6

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

Click Source Link

Usage

From source file:com.google.devtools.build.android.desugar.CoreLibraryInvocationRewriter.java

License:Open Source License

public CoreLibraryInvocationRewriter(ClassVisitor cv, CoreLibrarySupport support) {
    super(Opcodes.ASM6, cv);
    this.support = support;
}

From source file:com.google.devtools.build.android.desugar.EmulatedInterfaceRewriter.java

License:Open Source License

public EmulatedInterfaceRewriter(ClassVisitor dest, CoreLibrarySupport support) {
    super(Opcodes.ASM6, dest);
    this.support = support;
}

From source file:com.google.devtools.build.android.desugar.scan.PrefixReferenceScanner.java

License:Open Source License

public PrefixReferenceScanner(String prefix) {
    super(Opcodes.ASM6);
    this.prefix = prefix;
}

From source file:com.google.devtools.build.importdeps.DepsCheckerClassVisitor.java

License:Open Source License

public DepsCheckerClassVisitor(ClassCache classCache, ResultCollector resultCollector) {
    super(Opcodes.ASM6);
    this.classCache = classCache;
    this.resultCollector = resultCollector;
}

From source file:com.google.gwt.dev.javac.asm.CollectAnnotationData.java

License:Apache License

/**
 * Construct the collector./*www  .j a  va2  s.  c  o m*/
 *
 * @param desc class descriptor of the annotation class
 * @param visible true if the annotation is visible at runtime
 * @param callback callback to be called when the annotation is finished
 */
CollectAnnotationData(String desc, boolean visible, Callback<CollectAnnotationData.AnnotationData> callback) {
    super(Opcodes.ASM6);
    annotation = new AnnotationData(desc, visible);
    this.callback = callback;
}

From source file:com.google.gwt.dev.javac.asm.CollectFieldData.java

License:Apache License

public CollectFieldData(int access, String name, String desc, String signature, Object value) {
    super(Opcodes.ASM6);
    this.access = access;
    this.name = name;
    this.desc = desc;
    this.signature = signature;
    this.value = value;
}

From source file:com.google.gwt.dev.javac.asm.CollectMethodData.java

License:Apache License

/**
 * Prepare to collect data for a method from bytecode.
 *
 * @param classType//from  w w  w. jav a2  s . co m
 * @param access
 * @param name
 * @param desc
 * @param signature
 * @param exceptions
 */
@SuppressWarnings("unchecked")
// for new List[]
public CollectMethodData(CollectClassData.ClassType classType, int access, String name, String desc,
        String signature, String[] exceptions) {
    super(Opcodes.ASM6);
    this.access = access;
    this.name = name;
    this.desc = desc;
    this.signature = signature;
    this.exceptions = exceptions;
    syntheticArgs = 0;
    argTypes = Type.getArgumentTypes(desc);
    // Non-static instance methods and constructors of non-static inner
    // classes have an extra synthetic parameter that isn't in the source,
    // so we remove it. Note that for local classes, they may or may not
    // have this synthetic parameter depending on whether the containing
    // method is static, but we can't get that info here. However, since
    // local classes are dropped from TypeOracle, we don't care.
    if (classType.hasHiddenConstructorArg() && "<init>".equals(name)) {
        // remove "this$1" as a parameter
        if (argTypes.length < 1) {
            throw new IllegalStateException("Missing synthetic argument in constructor");
        }
        syntheticArgs = 1;
        int n = argTypes.length - syntheticArgs;
        Type[] newArgTypes = new Type[n];
        System.arraycopy(argTypes, syntheticArgs, newArgTypes, 0, n);
        argTypes = newArgTypes;
    }
    argNames = new String[argTypes.length];
    paramAnnots = new List[argTypes.length];
    for (int i = 0; i < argNames.length; ++i) {
        argNames[i] = "arg" + i;
        paramAnnots[i] = new ArrayList<CollectAnnotationData>();
    }
    if (argNames.length == 0) {
        // save some work later if there aren't any parameters
        actualArgNames = true;
    }
}

From source file:com.google.gwt.dev.javac.asm.CollectReferencesVisitor.java

License:Apache License

CollectReferencesVisitor() {
    this.av = new AnnotationVisitor(Opcodes.ASM6, this.av) {
        @Override/*from ww  w.  j  ava 2s. co m*/
        public void visitEnum(String name, String desc, String value) {
            addTypeIfClass(desc);
        }

        @Override
        public void visit(String name, Object value) {
            // don't mark this annotation as a reference or its arguments, so we can
            // handle binary-only annotations.
            // TODO(jat): consider implications of updating the annotation class
        }

    };
}

From source file:com.google.gwt.dev.javac.asm.EmptySignatureVisitor.java

License:Apache License

public EmptySignatureVisitor() {
    super(Opcodes.ASM6);
}

From source file:com.google.gwt.dev.javac.asmbridge.EmptyVisitor.java

License:Apache License

public EmptyVisitor() {
    super(Opcodes.ASM6);
}