I've created a method that uses reflection to execute getters over an object, but I need to know if the class is native to JAVA, for example: java.lang.String , or if it was implemented by the user: br.com.foo.bar .
In PHP I can tell if it was the User who defined the class using the following:
$ ReflectionClass = new ReflectionClass ($ class_name);
$ ReflectionClass-> isUserDefined ();
Would there be some way for me to achieve this in JAVA without doing a lot of:
method.getReturnType() == String.class || method.getReturnType() == Integer.class