use of com.github.javaparser.symbolsolver.resolution.typesolvers.MemoryTypeSolver in project javaparser by javaparser.
the class MethodContextResolutionTest method solveTypeRefToLocalClass.
@Test
public void solveTypeRefToLocalClass() {
CompilationUnit cu = parseSample("MethodWithTypes");
ClassOrInterfaceDeclaration cd = Navigator.demandClass(cu, "Main");
MethodDeclaration md = Navigator.demandMethod(cd, "methodWithLocalTypes");
Context context = new MethodContext(md, typeSolver);
SymbolReference<ResolvedTypeDeclaration> ref = context.solveType("LocalClass", new MemoryTypeSolver());
assertEquals(true, ref.isSolved());
}
Aggregations