Is there a handy-dandy equivalent to org.apache.commons.beanutils.PropertyUtils
on Android?
I can't seem to use bean utils
in my android app due to some dependencies on PropertyDescriptor
,and IndexedPropertyDescriptor
. So I'm wondering if there are any alternatives?
Basically all I want to do is use a method name as a string "someMethod" and feed that into setMethod(anObject, "someMethod", value)
, much like PropertyUtils
does; but without having to resort to the nasties of reflection...
Or are my hands tied and I need to use Reflection?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…