-
Notifications
You must be signed in to change notification settings - Fork 17
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
getTargetType() and getParameterizedTypeArguments() represents types/classes differently #11
Comments
The reason The only reason But, I agree with you, the method names suggests they return the same type. some solutions are:
The 1st option is perhaps more generic, or maybe add both methods? |
"The reason getTargetType() does not return a Class<?> is cos it could return a generic type, where" What I do now because I need the class is: Maybe both methods could exist. |
The reason Seems reasonable to add a helper.getTargetClass() method. The method could include error handling to provide a better exception/error message (rather than a ClassCastException) when casting |
This is pushed to master: Added new method: Renamed to: Added new method: |
Looks nice. |
Now available in v0.2.0. |
StringToTypeParserHelper contains:
public Type getTargetType()
public List<Class<?>> getParameterizedTypeArguments()
why doesn't getTargetType also return a class?
what I'am saying is getTargetType() and getParameterizedTypeArguments() could be aligned more.
The text was updated successfully, but these errors were encountered: