I am using JSS to resolve the type of method call receiver expression. During testing I observed that in a few places JSS failed to resolve type:
where the type is defined in the jar file:
Code:
//convert the output into list of lines
List lineList = IOUtils.readLines(new StringReader(output));
JSS failed to resolve the the type of IOUtils for the method call IOUtils.readLines(...)
IOUtils is defined Apache commons-io-2.6.jar (I have included the jar file path to my CombinedTypeSolver using a JarTypeSolver)
I have used the following command to resolve receiver expression of a method call:
ResolvedType resolvedType = JavaParserFacade.get(c.getType(m.getScope().get());
Here, c is an instance of CombinedTypeSolver and m is a an instance of MethodCallexpr
In some cases if the type is defined in a source code:
Code:
String output = ProcessUtility.output(process.getInputStream());
I have defined the ProcessUtility class but JSS failed to resolve type of ProcessUtility for the method call: ProcessUtility.output
I have added all the source code of the project (including the ProcessUtility.java) in my CombinedTypeSolver using a JavaParserTypeSolver.
I found that all new issues of JSS should be asked in the JavaParser project. Should I ask the question there and close this one? Please let me know. Thanks.
I am using JSS to resolve the type of method call receiver expression. During testing I observed that in a few places JSS failed to resolve type:
JSS failed to resolve the the type of IOUtils for the method call IOUtils.readLines(...) IOUtils is defined Apache commons-io-2.6.jar (I have included the jar file path to my CombinedTypeSolver using a JarTypeSolver)
I have used the following command to resolve receiver expression of a method call: ResolvedType resolvedType = JavaParserFacade.get(c.getType(m.getScope().get()); Here, c is an instance of CombinedTypeSolver and m is a an instance of MethodCallexpr
I have defined the ProcessUtility class but JSS failed to resolve type of ProcessUtility for the method call: ProcessUtility.output I have added all the source code of the project (including the ProcessUtility.java) in my CombinedTypeSolver using a JavaParserTypeSolver.
Any suggestion would be really helpful. Thanks.