-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
CtTypeImpl.getAllFields may throw a SpoonClassNotFoundException #775
Comments
The behavior of
If the super class is not present neither the AST neither in the classloader (for the reflexion), spoon throws the exception This behavior is 'normal' but can be improved. But according to me, this exception must not be threw in noclasspath mode, a partial response and a warning is more appropriate. |
How do I determine noclasspath mode from within spoon? |
if(factory.getEnvironment().getNoClasspath()) {
// is in no classpath
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would like to access all fields a of
CtType
node withgetAllFields
(inNoClasspath
mode). Unfortunately, this method may throw aSpoonClassNotFoundException
if the accessed class derives from another class not available in classpath. The following snippet show the corresponding stack trace:Is this behavior a bug or to be expected?
The text was updated successfully, but these errors were encountered: