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.google.java.contract.core.agent.ContractAnalyzer.java

License:Open Source License

/**
 * Constructs an empty ContractAnalyzer. The ContractAnalyzer is
 * intended to be filled through its visitor interface.
 *//*from  www  .java  2 s .  c  o m*/
ContractAnalyzer() {
    super(Opcodes.ASM5);
    classHandles = new ArrayList<ClassContractHandle>();
    methodHandles = new HashMap<String, ArrayList<MethodContractHandle>>();
}

From source file:com.google.java.contract.core.agent.ContractFixingClassAdapter.java

License:Open Source License

/**
 * Constructs a new ContractFixingClassAdapter.
 *
 * @param cv the ClassVisitor this adapter delegates to
 *//*  w w  w . j a v  a 2  s.c o  m*/
@Requires("cv != null")
public ContractFixingClassAdapter(ClassVisitor cv) {
    super(Opcodes.ASM5, cv);
}

From source file:com.google.java.contract.core.agent.HelperClassAdapter.java

License:Open Source License

@Requires("cv != null")
public HelperClassAdapter(ClassVisitor cv) {
    super(Opcodes.ASM5, cv);
}

From source file:com.google.java.contract.core.agent.LineNumberingClassAdapter.java

License:Open Source License

/**
 * Constructs a new LineNumberingClassAdapter.
 *
 * @param cv the ClassVisitor this adapter delegates to
 * @param lineNumbers the line numbers to associate with methods
 *//*from   w  w w . ja  v  a2s .com*/
@Requires({ "cv != null", "ContractMethodSignatures.isLineNumberList(lineNumbers)" })
public LineNumberingClassAdapter(ClassVisitor cv, List<Long> lineNumbers) {
    super(Opcodes.ASM5, cv);
    this.lineNumbers = lineNumbers;
}

From source file:com.google.java.contract.core.agent.LineNumberingMethodAdapter.java

License:Open Source License

/**
 * Constructs a new LineNumberingMethodAdapter.
 *
 * @param mv the MethodVisitor this adapter delegates to
 * @param access the access flags of the method
 * @param name the name of the method//  ww  w.j  a v a 2 s  . c  om
 * @param desc the descriptor of the method
 */
@Requires({ "mv != null", "name != null", "desc != null" })
public LineNumberingMethodAdapter(MethodVisitor mv, int access, String name, String desc) {
    super(Opcodes.ASM5, mv, access, name, desc);
    lineNumbers = null;
}

From source file:com.google.java.contract.core.agent.SpecificationClassAdapter.java

License:Open Source License

public SpecificationClassAdapter(ClassVisitor cv, ContractAnalyzer contracts) {
    super(Opcodes.ASM5, cv);
    this.contracts = contracts;
}

From source file:com.google.java.contract.core.agent.SpecificationMethodAdapter.java

License:Open Source License

/**
 * Constructs a new SpecificationClassAdapter.
 *
 * @param ca the class adapter which has spawned this method adapter
 * @param mv the method visitor to delegate to
 * @param access the method access bit mask
 * @param methodName the name of the method
 * @param methodDesc the descriptor of the method
 *///from   w  w w  . ja va  2 s . c  o m
@Requires({ "ca != null", "mv != null", "methodName != null", "methodDesc != null" })
public SpecificationMethodAdapter(SpecificationClassAdapter ca, MethodVisitor mv, int access, String methodName,
        String methodDesc) {
    super(Opcodes.ASM5, mv, access, methodName, methodDesc);

    methodStart = new Label();
    methodEnd = new Label();

    this.contracts = ca.getContracts();
    className = ca.getClassName();
    this.methodName = methodName;
    this.methodDesc = methodDesc;
    thisType = Type.getType("L" + className + ";");

    statik = (access & ACC_STATIC) != 0;
    isConstructor = methodName.equals("<init>");
    isStaticInit = methodName.endsWith("<clinit>");

    contextLocal = -1;
    checkInvariantsLocal = -1;
    oldValueLocals = new ArrayList<Integer>();
    signalOldValueLocals = new ArrayList<Integer>();

    classAdapter = ca;

    ActivationRuleManager am = ActivationRuleManager.getInstance();
    withPreconditions = am.hasPreconditionsEnabled(className);
    withPostconditions = am.hasPostconditionsEnabled(className);
    withInvariants = am.hasInvariantsEnabled(className);
}

From source file:com.google.monitoring.runtime.instrumentation.adapters.AllocationClassAdapter.java

License:Apache License

public AllocationClassAdapter(final ClassVisitor cv, final String recorderClass, final String recorderMethod) {
    super(Opcodes.ASM5, cv);
    this.recorderClass = recorderClass;
    this.recorderMethod = recorderMethod;
}

From source file:com.google.monitoring.runtime.instrumentation.adapters.AllocationMethodAdapter.java

License:Apache License

public AllocationMethodAdapter(final MethodVisitor mv, final String recorderClass,
        final String recorderMethod) {
    super(Opcodes.ASM5, mv);
    this.recorderClass = recorderClass;
    this.recorderMethod = recorderMethod;
}

From source file:com.google.monitoring.runtime.instrumentation.adapters.EscapeMethodAdapter.java

License:Apache License

/**
 * A new AllocationMethodAdapter is created for each method that gets visited.
 *//*from   ww  w.j  a  v  a 2  s.c  o m*/
public EscapeMethodAdapter(MethodVisitor mv, String recorderClass, String recorderMethod) {
    super(Opcodes.ASM5, mv);
}