Class RobolectricGeneratorAdapter

java.lang.Object
org.objectweb.asm.MethodVisitor
org.objectweb.asm.commons.LocalVariablesSorter
org.objectweb.asm.commons.GeneratorAdapter
org.robolectric.internal.bytecode.RobolectricGeneratorAdapter

public class RobolectricGeneratorAdapter
extends org.objectweb.asm.commons.GeneratorAdapter
GeneratorAdapter implementation specific to generate code for Robolectric purposes
  • Field Summary

    Fields inherited from class org.objectweb.asm.commons.GeneratorAdapter

    ADD, AND, DIV, EQ, GE, GT, LE, LT, MUL, NE, NEG, OR, REM, SHL, SHR, SUB, USHR, XOR

    Fields inherited from class org.objectweb.asm.commons.LocalVariablesSorter

    firstLocal, nextLocal

    Fields inherited from class org.objectweb.asm.MethodVisitor

    api, mv
  • Constructor Summary

    Constructors 
    Constructor Description
    RobolectricGeneratorAdapter​(org.objectweb.asm.tree.MethodNode methodNode)  
  • Method Summary

    Modifier and Type Method Description
    org.objectweb.asm.Type getReturnType()  
    void invokeMethod​(String internalClassName, org.objectweb.asm.tree.MethodNode method)  
    boolean isStatic()  
    void loadNull()  
    void loadThisOrNull()  
    void pushDefaultReturnValueToStack​(org.objectweb.asm.Type type)
    Forces a return of a default value, depending on the method's return type
    org.robolectric.internal.bytecode.ClassInstrumentor.TryCatch tryStart​(org.objectweb.asm.Type exceptionType)  

    Methods inherited from class org.objectweb.asm.commons.GeneratorAdapter

    arrayLength, arrayLoad, arrayStore, box, cast, catchException, checkCast, dup, dup2, dup2X1, dup2X2, dupX1, dupX2, endMethod, getAccess, getArgumentTypes, getField, getLocalType, getName, getStatic, goTo, ifCmp, ifICmp, ifNonNull, ifNull, ifZCmp, iinc, instanceOf, invokeConstructor, invokeDynamic, invokeInterface, invokeStatic, invokeVirtual, loadArg, loadArgArray, loadArgs, loadArgs, loadLocal, loadLocal, loadThis, mark, mark, math, monitorEnter, monitorExit, newArray, newInstance, newLabel, not, pop, pop2, push, push, push, push, push, push, push, push, push, putField, putStatic, ret, returnValue, setLocalType, storeArg, storeLocal, storeLocal, swap, swap, tableSwitch, tableSwitch, throwException, throwException, unbox, valueOf

    Methods inherited from class org.objectweb.asm.commons.LocalVariablesSorter

    newLocal, newLocalMapping, updateNewLocals, visitFrame, visitIincInsn, visitLocalVariable, visitLocalVariableAnnotation, visitMaxs, visitVarInsn

    Methods inherited from class org.objectweb.asm.MethodVisitor

    getDelegate, visitAnnotableParameterCount, visitAnnotation, visitAnnotationDefault, visitAttribute, visitCode, visitEnd, visitFieldInsn, visitInsn, visitInsnAnnotation, visitIntInsn, visitInvokeDynamicInsn, visitJumpInsn, visitLabel, visitLdcInsn, visitLineNumber, visitLookupSwitchInsn, visitMethodInsn, visitMethodInsn, visitMultiANewArrayInsn, visitParameter, visitParameterAnnotation, visitTableSwitchInsn, visitTryCatchAnnotation, visitTryCatchBlock, visitTypeAnnotation, visitTypeInsn

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • loadThisOrNull

      public void loadThisOrNull()
    • isStatic

      public boolean isStatic()
    • loadNull

      public void loadNull()
    • getReturnType

      public org.objectweb.asm.Type getReturnType()
      Overrides:
      getReturnType in class org.objectweb.asm.commons.GeneratorAdapter
    • pushDefaultReturnValueToStack

      public void pushDefaultReturnValueToStack​(org.objectweb.asm.Type type)
      Forces a return of a default value, depending on the method's return type
      Parameters:
      type - The method's return type
    • invokeMethod

      public void invokeMethod​(String internalClassName, org.objectweb.asm.tree.MethodNode method)
    • tryStart

      public org.robolectric.internal.bytecode.ClassInstrumentor.TryCatch tryStart​(org.objectweb.asm.Type exceptionType)