@Test void test_UniformPropertyAccess() { assertEquals("uniformProperty", PropertyAccessStrategy.getProperty(Bean.class, "uniformProperty").getValue( new Bean())); }
public static <T> Property<T> getProperty(Class<? extends T> targetClass, String propertyName) { Property<T> property = null; Iterator<PropertyAccessStrategy> strategies = STRATEGIES.iterator(); while (property == null && strategies.hasNext()) { property = strategies.next().propertyFor(targetClass, propertyName); } return property; }
PropertyAccessStrategy implements Comparable<PropertyAccessStrategy> { public static <T> Property<T> getProperty(Class<? extends T> targetClass, String propertyName) { Property<T> property = null; Iterator<PropertyAccessStrategy> strategies = STRATEGIES.iterator(); while (property == null && strategies.hasNext()) { property = strategies.next().propertyFor(targetClass, propertyName); } return property; } }
PropertyAccessStrategy implements Comparable<PropertyAccessStrategy> { public static <T> Property<T> getProperty(Class<? extends T> targetClass, String propertyName) { Property<T> property = null; Iterator<PropertyAccessStrategy> strategies = STRATEGIES.iterator(); while (property == null && strategies.hasNext()) { property = strategies.next().propertyFor(targetClass, propertyName); } return property; }  }
PropertyAccessStrategy implements Comparable<PropertyAccessStrategy> { public static <T> Property<T> getProperty(Class<? extends T> targetClass, String propertyName) { Property<T> property = null; Iterator<PropertyAccessStrategy> strategies = STRATEGIES.iterator(); while (property == null && strategies.hasNext()) { property = strategies.next().propertyFor(targetClass, propertyName); } return property; }  static void register(PropertyAccessStrategy strategy); static void unregister(PropertyAccessStrategy strategy); static Property<T> getProperty(Class<? extends T> targetClass, String propertyName); @Override final int compareTo(PropertyAccessStrategy o); }
PropertyAccessStrategy implements Comparable<PropertyAccessStrategy> { public static <T> Property<T> getProperty(Class<? extends T> targetClass, String propertyName) { Property<T> property = null; Iterator<PropertyAccessStrategy> strategies = STRATEGIES.iterator(); while (property == null && strategies.hasNext()) { property = strategies.next().propertyFor(targetClass, propertyName); } return property; }  static void register(PropertyAccessStrategy strategy); static void unregister(PropertyAccessStrategy strategy); static Property<T> getProperty(Class<? extends T> targetClass, String propertyName); @Override final int compareTo(PropertyAccessStrategy o);  }