use of com.github.javaparser.symbolsolver.resolution.typesolvers.CombinedTypeSolver in project javaparser by javaparser.
the class JavassistClassDeclarationTest method setup.
@Before
public void setup() throws IOException {
String pathToJar = adaptPath("src/test/resources/javaparser-core-2.1.0.jar");
typeSolver = new CombinedTypeSolver(new JarTypeSolver(pathToJar), new ReflectionTypeSolver());
String newPathToJar = adaptPath("src/test/resources/javaparser-core-3.0.0-alpha.2.jar");
newTypeSolver = new CombinedTypeSolver(new JarTypeSolver(newPathToJar), new ReflectionTypeSolver());
String anotherPathToJar = adaptPath("src/test/resources/test-artifact-1.0.0.jar");
anotherTypeSolver = new CombinedTypeSolver(new JarTypeSolver(anotherPathToJar), new ReflectionTypeSolver());
}
use of com.github.javaparser.symbolsolver.resolution.typesolvers.CombinedTypeSolver in project javaparser by javaparser.
the class JavassistInterfaceDeclarationTest method setup.
@Before
public void setup() throws IOException {
String pathToJar = adaptPath("src/test/resources/javaparser-core-3.0.0-alpha.2.jar");
typeSolver = new CombinedTypeSolver(new JarTypeSolver(pathToJar), new ReflectionTypeSolver());
String anotherPathToJar = adaptPath("src/test/resources/test-artifact-1.0.0.jar");
anotherTypeSolver = new CombinedTypeSolver(new JarTypeSolver(anotherPathToJar), new ReflectionTypeSolver());
}
use of com.github.javaparser.symbolsolver.resolution.typesolvers.CombinedTypeSolver in project javaparser by javaparser.
the class DifferentiateDotExpressionTest method setup.
@Before
public void setup() {
CombinedTypeSolver combinedTypeSolver = new CombinedTypeSolver();
combinedTypeSolver.add(new ReflectionTypeSolver());
combinedTypeSolver.add(new JavaParserTypeSolver(adaptPath(new File("src/test/resources/differentiate_dot_expressions"))));
typeSolver = combinedTypeSolver;
}
use of com.github.javaparser.symbolsolver.resolution.typesolvers.CombinedTypeSolver in project javaparser by javaparser.
the class JavaParserAnonymousClassDeclarationTest method callingSuperClassInnerClassMethod.
@Test
public void callingSuperClassInnerClassMethod() {
CompilationUnit cu = parseSample("AnonymousClassDeclarations");
ClassOrInterfaceDeclaration aClass = Navigator.demandClass(cu, "AnonymousClassDeclarations");
MethodDeclaration method = Navigator.demandMethod(aClass, "fooBar2");
MethodCallExpr methodCall = Navigator.findMethodCall(method, "innerClassMethod").get();
CombinedTypeSolver combinedTypeSolver = new CombinedTypeSolver();
combinedTypeSolver.add(new ReflectionTypeSolver());
MethodUsage methodUsage = JavaParserFacade.get(combinedTypeSolver).solveMethodAsUsage(methodCall);
assertThat(methodUsage.getQualifiedSignature(), is("AnonymousClassDeclarations.DoFn.ProcessContext.innerClassMethod()"));
}
use of com.github.javaparser.symbolsolver.resolution.typesolvers.CombinedTypeSolver in project javaparser by javaparser.
the class Issue257 method setup.
@Before
public void setup() throws IOException {
String pathToJar = adaptPath("src/test/resources/issue257/issue257.jar");
File jar = new File(pathToJar);
typeSolver = new CombinedTypeSolver(new JarTypeSolver(jar.getAbsolutePath()), new ReflectionTypeSolver());
}
Aggregations