// Path: app/src/main/java/com/knight/arch/module/Injector.java
// public abstract interface Injector {
//   public abstract List<Object> getModules();
// 
//   public abstract void inject(Object target);
// 
//   public abstract ObjectGraph plus(Object[] modules);
// }


import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.knight.arch.module.Injector;
package com.knight.arch.ui.base;




/**
 * @author andyiac
 * @date 15-9-16
 * @web http://blog.andyiac.com
 * @github https://github.com/andyiac
 */
public class InjectableFragment extends BaseFragment {
    boolean injected = false;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return super.onCreateView(inflater, container, savedInstanceState);
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
    }

    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);
        if (!injected) {
            injected = true;
// Path: app/src/main/java/com/knight/arch/module/Injector.java
// public abstract interface Injector {
//   public abstract List<Object> getModules();
// 
//   public abstract void inject(Object target);
// 
//   public abstract ObjectGraph plus(Object[] modules);
// }


// Path: app/src/main/java/com/knight/arch/ui/base/InjectableFragment.java
import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.knight.arch.module.Injector;

package com.knight.arch.ui.base;




/**
 * @author andyiac
 * @date 15-9-16
 * @web http://blog.andyiac.com
 * @github https://github.com/andyiac
 */
public class InjectableFragment extends BaseFragment {
    boolean injected = false;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return super.onCreateView(inflater, container, savedInstanceState);
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
    }

    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);
        if (!injected) {
            injected = true;
            Injector injector = (Injector) getActivity();