@Test public void testCreateWithInstance1() { Bar bar = new Bar(); bar.name = "baz"; Map myMap = map( "bar", bar ); Foo foo = create( fooType, myMap ); boolean ok = foo != null || die(); ok = foo.bar != null || die(); ok = foo.bar.name.equals( "baz" ) || die(); }
public static <T> T create(Class<T> type, Map<?, ?> map) { Context context = DependencyInjection.fromMap(map); context.add( DependencyInjection.classes(type) ); return context.get( type ); }
Creator { public static <T> T create(Class<T> type, Map<?, ?> map) { Context context = DependencyInjection.fromMap(map); context.add( DependencyInjection.classes(type) ); return context.get( type ); } }
Creator { public static <T> T create(Class<T> type, Map<?, ?> map) { Context context = DependencyInjection.fromMap(map); context.add( DependencyInjection.classes(type) ); return context.get( type ); }  }
Creator { public static <T> T create(Class<T> type, Map<?, ?> map) { Context context = DependencyInjection.fromMap(map); context.add( DependencyInjection.classes(type) ); return context.get( type ); }  static T create(Class<T> type, Map<?, ?> map); static T create(Class<T> type, Context context); static T newOf( Class<T> type, Object... args ); }
Creator { public static <T> T create(Class<T> type, Map<?, ?> map) { Context context = DependencyInjection.fromMap(map); context.add( DependencyInjection.classes(type) ); return context.get( type ); }  static T create(Class<T> type, Map<?, ?> map); static T create(Class<T> type, Context context); static T newOf( Class<T> type, Object... args );  }