replaced use of java.beans api by raw reflection to make this work on Android