@Test @SneakyThrows public void properties() { Layout<Properties> layout = Layout.forClass(Properties.class); List<Property<Properties>> properties = layout.getProperties(); assertEquals(properties.size(), 3); assertEquals(properties.get(0).getName(), "a"); assertEquals(properties.get(1).getName(), "b"); assertEquals(properties.get(2).getName(), "c"); List<Property<Properties>> constructorProperties = layout.getConstructorProperties(); assertEquals(constructorProperties.size(), 3); assertEquals(constructorProperties.get(0).getName(), "c"); assertEquals(constructorProperties.get(1).getName(), "a"); assertEquals(constructorProperties.get(2).getName(), "b"); }
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; }