There are tons of existing classes that will do wonders with reflection, but some (many) aren’t available in Android… E.g., since java.beans.introspection requires AWT, it’s not supported.

One common operation is copying properties from one object to another. Here’s an example using traditional Reflection.

Copier.copy(objectToCopyFrom, objectToCopyTo);

It’ll look at objectToCopyFrom, find all public getters (using regex), then look for the appropriate setter on objectToCopyTo (by matching the name, then the return type of the getter to the expected parameter type of the setter). If all those match, it will invoke the getter and pass that return to the first parameter of the setter, and invoke it as well.

Optional white- and black-list of method names are also supported.

This works in a simple example but has not been tested thoroughly, either through formal unit tests or in the wild. Use at your own risk.