@Test public void testByDefaultConstructor() throws ScriptException { DefaultConstructorStrategy constructorStrategy = DefaultConstructorStrategy.byDefaultConstructor(); TestConstructor constructed = (TestConstructor) constructorStrategy.construct(TestConstructor.class); assertThat(constructed.message).isEqualTo("TestConstructor()"); }
public static DefaultConstructorStrategy byDefaultConstructor() { return new DefaultConstructorStrategy(new Class<?>[0], new Object[0]); }
DefaultConstructorStrategy implements ConstructorStrategy { public static DefaultConstructorStrategy byDefaultConstructor() { return new DefaultConstructorStrategy(new Class<?>[0], new Object[0]); } }
DefaultConstructorStrategy implements ConstructorStrategy { public static DefaultConstructorStrategy byDefaultConstructor() { return new DefaultConstructorStrategy(new Class<?>[0], new Object[0]); } private  DefaultConstructorStrategy(Class<?>[] argumentTypes, Object[] arguments); }
DefaultConstructorStrategy implements ConstructorStrategy { public static DefaultConstructorStrategy byDefaultConstructor() { return new DefaultConstructorStrategy(new Class<?>[0], new Object[0]); } private  DefaultConstructorStrategy(Class<?>[] argumentTypes, Object[] arguments); @Override Object construct(Class<?> clazz); static DefaultConstructorStrategy byDefaultConstructor(); static DefaultConstructorStrategy byArgumentTypes(Class<?>[] argumentTypes, Object... arguments); static DefaultConstructorStrategy byMatchingArguments(Object... arguments); }
DefaultConstructorStrategy implements ConstructorStrategy { public static DefaultConstructorStrategy byDefaultConstructor() { return new DefaultConstructorStrategy(new Class<?>[0], new Object[0]); } private  DefaultConstructorStrategy(Class<?>[] argumentTypes, Object[] arguments); @Override Object construct(Class<?> clazz); static DefaultConstructorStrategy byDefaultConstructor(); static DefaultConstructorStrategy byArgumentTypes(Class<?>[] argumentTypes, Object... arguments); static DefaultConstructorStrategy byMatchingArguments(Object... arguments);  }