2

What is Guava's version of BeanUtils.getProperty() implementation?
I am bit new Guava library. Could not find anything similar in Guava's reflection library.
Need it to write JSR 303 custom validators.

final String fieldValue = BeanUtils.getProperty(value, fieldName);
Himanshu Yadav
  • 13,315
  • 46
  • 162
  • 291
  • 4
    [`Properties.getPropertyByName(Object bean, String propertyName)`](https://guava-reflection.googlecode.com/svn/maven-site-repository/apidocs/com/google/code/guava/beans/Properties.html#getPropertyByName%28java.lang.Object,%20java.lang.String%29) – Tunaki Sep 08 '15 at 15:45
  • @Tunaki Where can I find this `Properties.getPropertyName`? – Himanshu Yadav Sep 08 '15 at 15:52
  • @HimanshuYadav click on the link in Tunaki's comment. – JB Nizet Sep 08 '15 at 16:02
  • 6
    @Tunaki, that's not part of Guava, that's just from some random other library that calls itself Guava Reflection. Guava has no reflective utilities for this operation, and I'm not sure why the OP assumed it did. – Louis Wasserman Sep 08 '15 at 16:43
  • @Tunaki Agree with @LouisWasserman, Eclipse does not recognize `com.google.code.guava.beans.Properties` – Himanshu Yadav Sep 08 '15 at 16:56
  • Why do you need a Guava equivalent? – dimo414 Nov 22 '17 at 10:03

0 Answers0