package com.episode6.hackit.mockspresso;

import com.episode6.hackit.mockspresso.api.InjectionConfig;
import com.episode6.hackit.mockspresso.api.MockerConfig;
import com.episode6.hackit.mockspresso.api.SpecialObjectMaker;
import com.episode6.hackit.mockspresso.internal.MockspressoBuilderImpl;
import com.episode6.hackit.mockspresso.reflect.TypeToken;
import org.junit.rules.MethodRule;

import java.lang.annotation.Annotation;
import java.util.List;

/**
 * Main mockspresso interface
 */
public interface Mockspresso {
  <T> T create(Class<T> clazz);
  <T> T create(TypeToken<T> typeToken);
  Builder buildUpon();

  interface Rule extends Mockspresso, MethodRule {}

  interface Builder {
    Builder fieldsFrom(Object objectWithFields);
    Builder mockerConfig(MockerConfig mockerConfig);
    Builder injectionConfig(InjectionConfig injectionConfig);
    Builder specialObjectMaker(SpecialObjectMaker specialObjectMaker);
    Builder specialObjectMakers(List<SpecialObjectMaker> specialObjectMakers);

    <T> Builder dependency(Class<T> clazz, T value);
    <T> Builder dependency(TypeToken<T> typeToken, T value);
    <T> Builder dependency(Class<T> clazz, Annotation annotation, T value);
    <T> Builder dependency(TypeToken<T> typeToken, Annotation annotation, T value);

    Mockspresso build();
    Rule buildRule();
  }

  class Builders {
    static Builder empty() {
      return new MockspressoBuilderImpl();
    }
  }
}

@@ -219,80 +219,8 @@
 er;%0A
-import com.episode6.hackit.mockspresso.internal.MockspressoBuilderImpl;%0A
 impo
@@ -1278,16 +1278,23 @@
 s %7B%0A    
+public 
 static B
@@ -1331,31 +1331,232 @@
 new 
-MockspressoBuilderImpl(
+com.episode6.hackit.mockspresso.internal.MockspressoBuilderImpl();%0A    %7D%0A    public static Builder simple() %7B%0A      return empty()%0A          .injectionConfig(new com.episode6.hackit.mockspresso.inject.SimpleInjectionConfig()
 );%0A 

use full package names (instead of imports) in Mockspresso.Builders