package com.miguelgaeta.bootstrap.mg_reflection;

import android.content.Context;

/**
 * Created by Miguel on 1/23/2015. Copyright 2014 Blitz Studios
 */
@SuppressWarnings("UnusedDeclaration")
public class MGReflectionConfig {

    Context context;

    /**
     * Initialize the reflection library
     * with an application context.
     */
    public void init(Context context) {

        this.context = context;
    }
}
@@ -43,16 +43,48 @@
 ction;%0A%0A
+import android.app.Application;%0A
 import a
@@ -422,31 +422,276 @@
     
-this.context = context;
+if (context instanceof Application) %7B%0A%0A            // Set the context.%0A            this.context = context;%0A%0A        %7D else %7B%0A%0A            // Enforce use of an application context.%0A            throw new RuntimeException(%22An application context is required.%22);%0A        %7D
 %0A   

Enforce application context.