private void addRoboInitMethod(MutableClass mutableClass) {
    MethodNode initMethodNode = new MethodNode(Opcodes.ACC_PROTECTED, ROBO_INIT_METHOD_NAME, "()V", null, null);
    RobolectricGeneratorAdapter generator = new RobolectricGeneratorAdapter(initMethodNode);
    Label alreadyInitialized = new Label();
    generator.loadThis();                                         // this
    generator.getField(mutableClass.classType, ShadowConstants.CLASS_HANDLER_DATA_FIELD_NAME, OBJECT_TYPE);  // contents of __robo_data__
    generator.ifNonNull(alreadyInitialized);
    generator.loadThis();                                         // this
    generator.loadThis();                                         // this, this
    writeCallToInitializing(mutableClass, generator);
    // this, __robo_data__
    generator.putField(mutableClass.classType, ShadowConstants.CLASS_HANDLER_DATA_FIELD_NAME, OBJECT_TYPE);
    generator.mark(alreadyInitialized);
    generator.returnValue();
    mutableClass.addMethod(initMethodNode);
  }
private void addRoboInitMethod(MutableClass mutableClass) {
    MethodNode initMethodNode = new MethodNode(Opcodes.ACC_PROTECTED, ROBO_INIT_METHOD_NAME, "()V", null, null);
    RobolectricGeneratorAdapter generator = new RobolectricGeneratorAdapter(initMethodNode);
    Label alreadyInitialized = new Label();
    generator.loadThis();                                         
    generator.getField(mutableClass.classType, ShadowConstants.CLASS_HANDLER_DATA_FIELD_NAME, OBJECT_TYPE);  
    generator.ifNonNull(alreadyInitialized);
    generator.loadThis();                                         
    generator.loadThis();                                         
    writeCallToInitializing(mutableClass, generator);
    
    generator.putField(mutableClass.classType, ShadowConstants.CLASS_HANDLER_DATA_FIELD_NAME, OBJECT_TYPE);
    generator.mark(alreadyInitialized);
    generator.returnValue();
    mutableClass.addMethod(initMethodNode);
  }
private void addRoboInitMethod ( MutableClass mutableClass ) { MethodNode initMethodNode = new MethodNode ( Opcodes . ACC_PROTECTED , ROBO_INIT_METHOD_NAME , "()V" , null , null ) ; RobolectricGeneratorAdapter generator = new RobolectricGeneratorAdapter ( initMethodNode ) ; Label alreadyInitialized = new Label ( ) ; generator . loadThis ( ) ; // this generator . getField ( mutableClass . classType , ShadowConstants . CLASS_HANDLER_DATA_FIELD_NAME , OBJECT_TYPE ) ; // contents of __robo_data__ generator . ifNonNull ( alreadyInitialized ) ; generator . loadThis ( ) ; // this generator . loadThis ( ) ; // this, this writeCallToInitializing ( mutableClass , generator ) ; // this, __robo_data__ generator . putField ( mutableClass . classType , ShadowConstants . CLASS_HANDLER_DATA_FIELD_NAME , OBJECT_TYPE ) ; generator . mark ( alreadyInitialized ) ; generator . returnValue ( ) ; mutableClass . addMethod ( initMethodNode ) ; }
Generates code like this:
```java
protected void $$robo$init() {
if (__robo_data__ == null) {
__robo_data__ = RobolectricInternals.initializing(this);
}
}
```
Generates code like this : java protected void $$robo$init () { if ( __robo_data__ == null ) { __robo_data__ = RobolectricInternals . initializing ( this ) ; } }