ReflectiveAttribute extends SimpleAttribute<O, A> { public static <O, A> ReflectiveAttribute<O, A> forField(Class<O> objectType, Class<A> fieldType, String fieldName) { return new ReflectiveAttribute<O, A>(objectType, fieldType, fieldName); } ReflectiveAttribute(Class<O> objectType, Class<A> fieldType, String fieldName); @Override A getValue(O object, QueryOptions queryOptions); @Override boolean equals(Object o); @Override boolean canEqual(Object other); @Override int hashCode(); static ReflectiveAttribute<O, A> forField(Class<O> objectType, Class<A> fieldType, String fieldName);  }
@Test(expected = IllegalStateException.class) public void testInvalidField() { ReflectiveAttribute.forField(Foo.class, int.class, "baz"); }
@Test(expected = IllegalStateException.class) public void testInvalidFieldType() { ReflectiveAttribute.forField(Foo.class, double.class, "foo"); }