@Test @SneakyThrows public void explicitConstructor() { Layout<ExplicitConstructor> layout = Layout.forClass(ExplicitConstructor.class); Parameter[] parameters = layout.getConstructor().getParameters(); assertEquals(parameters[0].getName(), "a"); assertEquals(parameters[0].getType(), Integer.class); assertEquals(parameters[1].getName(), "b"); assertEquals(parameters[1].getType(), String.class); }
public static <T> Layout<T> forClass(Class<T> klass) throws TypeHandler.TypeHandlerException, IntrospectionException, NoSuchAlgorithmException, IllegalAccessException { return new Layout<>(klass); }
Layout { public static <T> Layout<T> forClass(Class<T> klass) throws TypeHandler.TypeHandlerException, IntrospectionException, NoSuchAlgorithmException, IllegalAccessException { return new Layout<>(klass); } }
Layout { public static <T> Layout<T> forClass(Class<T> klass) throws TypeHandler.TypeHandlerException, IntrospectionException, NoSuchAlgorithmException, IllegalAccessException { return new Layout<>(klass); } @LayoutConstructor  Layout(String name, List<Property<T>> properties); private  Layout(Class<T> klass); }
Layout { public static <T> Layout<T> forClass(Class<T> klass) throws TypeHandler.TypeHandlerException, IntrospectionException, NoSuchAlgorithmException, IllegalAccessException { return new Layout<>(klass); } @LayoutConstructor  Layout(String name, List<Property<T>> properties); private  Layout(Class<T> klass); static Layout<T> forClass(Class<T> klass); Property<T> getProperty(String name); T instantiate(); T instantiate(Map<Property<T>, Object> properties); @Override boolean equals(Object obj); String toString(); }
Layout { public static <T> Layout<T> forClass(Class<T> klass) throws TypeHandler.TypeHandlerException, IntrospectionException, NoSuchAlgorithmException, IllegalAccessException { return new Layout<>(klass); } @LayoutConstructor  Layout(String name, List<Property<T>> properties); private  Layout(Class<T> klass); static Layout<T> forClass(Class<T> klass); Property<T> getProperty(String name); T instantiate(); T instantiate(Map<Property<T>, Object> properties); @Override boolean equals(Object obj); String toString(); static final String DIGEST_ALGORITHM; }