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
SymbolSolver is unable to .resolve() #3816
Comments
To resolve anything in JavaParser you have to configure the symbol solver. This link may be able to help you understand how JP works. You can also watch symbol solver test classes for inspiration on how to implement it. If this is not enough, do not hesitate to post your questions on this issue. |
Did this answer answer your question? |
@jlerbsc Unfortunately, I could not figure it out the error. |
Do you still have the same error when initializing the symbol solver? |
Yes, unfortunately. I am just parsing my project then ı am using the visitor. I have changed the visitor as below but still have the same error.
|
Your code snippet does not show symbol solver initialization. |
Aaa yes I have used symbol solver. I have used the previous code here. But with the symbol solver, I am using ResolvedType and ResolvedReferenceTypeDeclaration to reach the subclasses. The error came from there and still could not fix it. |
Can you provide us with a simplified test case that reproduces your issue? |
Hi sorry for the late response. I am in a hurry, that's why ı have tried another class to solve it and it worked. Thanks a lot for your help :) |
Hi
I want to find the number of immediate subclasses subordinated to a class hierarchy. Basically, I want to find the NOC metric.
For this I have created a visitor as below;
to call the visitor I have used
CompilationUnit
and I have parsed it. then ı have called the visitor. as below;I am actually using a collector to keep the values but this was only to check if it works. I have done the same thing with wmc and dit metrics. they are working perfectly.
However I am getting an error when ı use the solver. like below
So I will use this resolve a lot as I understand because I have a bunch of metrics to calculate. And I have skipped it since it has an error but the same problem occurred when I try to find NOC and RFC metrics. I will find this metrics for a project so there will be more than one java class.
What ı am missing here, I am literally get blind while I am searching.
The text was updated successfully, but these errors were encountered: