Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introspector that can deal with public fields #182

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SQiShER
Copy link
Owner

@SQiShER SQiShER commented Feb 13, 2017

This PR adds several new introspectors to support a wider array of use-cases.

The FieldIntrospector detects the properties of the underlying classes by scanning the public fields and exposing them as simple accessors.

The GetterSetterIntropector is a drop-in replacement for the currently used StandardIntrospector. It uses simple reflection instead of the more sophisticated JRE-provided java.beans.Introspector at the cost of performance (although as of right now this is just an assumption. I didn't test it). The big advantage of this approach is Android-compatbility, since the java.beans.Introspector isn't available on Android-platforms.

The DefaultIntrospector is just a composite of the above mentioned two with the option to enable field introspection. Once it's fully tested and I'm sure it behaves exactly like the StandardIntrospector it will become the new default and the StandardIntrospector will be removed.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.8%) to 89.569% when pulling 5d9ef36 on introspector2point0 into cd8b520 on master.

@SQiShER SQiShER mentioned this pull request Feb 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants