VisitorService extends AbstractService<VisitorService> { public ASTCDMethod getVisitorMethod(String methodName, ASTMCType nodeType) { ASTCDParameter visitorParameter = CDParameterFacade.getInstance().createParameter(nodeType, "node"); return CDMethodFacade.getInstance().createMethod(PUBLIC, methodName, visitorParameter); } VisitorService(ASTCDCompilationUnit compilationUnit);  VisitorService(CDDefinitionSymbol cdSymbol); @Override String getSubPackage(); static VisitorService createVisitorService(CDDefinitionSymbol cdSymbol); String getVisitorSimpleName(); String getVisitorSimpleName(CDDefinitionSymbol cdSymbol); String getVisitorFullName(); String getVisitorFullName(CDDefinitionSymbol cdSymbol); ASTMCQualifiedType getVisitorType(CDDefinitionSymbol cdSymbol); ASTMCQualifiedType getVisitorType(); String getInheritanceVisitorSimpleName(); String getInheritanceVisitorSimpleName(CDDefinitionSymbol cdSymbol); String getInheritanceVisitorFullName(CDDefinitionSymbol cdSymbol); String getInheritanceVisitorFullName(); String getParentAwareVisitorSimpleName(); String getParentAwareVisitorSimpleName(CDDefinitionSymbol cdDefinitionSymbol); String getParentAwareVisitorFullName(); String getParentAwareVisitorFullName(CDDefinitionSymbol cdDefinitionSymbol); String getDelegatorVisitorSimpleName(); String getDelegatorVisitorSimpleName(CDDefinitionSymbol cdDefinitionSymbol); String getDelegatorVisitorFullName(); String getDelegatorVisitorFullName(CDDefinitionSymbol cdDefinitionSymbol); List<ASTMCQualifiedType> getAllVisitorTypesInHierarchy(); ASTCDMethod getVisitorMethod(String methodName, ASTMCType nodeType); ASTCDCompilationUnit calculateCDTypeNamesWithASTPackage(ASTCDCompilationUnit input); ASTCDDefinition calculateCDTypeNamesWithASTPackage(CDDefinitionSymbol input); List<ASTMCQualifiedType> getSuperInheritanceVisitors(); List<ASTMCQualifiedType> getSuperVisitors(); List<ASTMCQualifiedType> getSuperSymbolVisitors();  }
@Test public void testGetVisitorMethod() { ASTCDMethod visitMethod = astService.getVisitorMethod("visit", mcTypeFacade.createQualifiedType("_ast.ASTFoo")); assertEquals("visit", visitMethod.getName()); assertTrue(visitMethod.getMCReturnType().isPresentMCVoidType()); assertEquals(1, visitMethod.sizeCDParameters()); assertEquals("node", visitMethod.getCDParameter(0).getName()); assertDeepEquals("_ast.ASTFoo", visitMethod.getCDParameter(0).getMCType()); }