SymbolTableService extends AbstractService<SymbolTableService> { public boolean hasStartProd() { return getStartProd().isPresent(); } SymbolTableService(ASTCDCompilationUnit compilationUnit);  SymbolTableService(CDDefinitionSymbol cdSymbol); @Override String getSubPackage(); static SymbolTableService createSymbolTableService(CDDefinitionSymbol cdSymbol); String getSerializationPackage(CDDefinitionSymbol cdDefinitionSymbol); String getScopeClassSimpleName(); String getScopeClassSimpleName(CDDefinitionSymbol cdSymbol); String getScopeClassFullName(); String getScopeClassFullName(CDDefinitionSymbol cdSymbol); ASTMCQualifiedType getScopeType(); String getScopeInterfaceSimpleName(); String getScopeInterfaceSimpleName(CDDefinitionSymbol cdSymbol); String getScopeInterfaceFullName(); String getScopeInterfaceFullName(CDDefinitionSymbol cdSymbol); ASTMCQualifiedType getScopeInterfaceType(); ASTMCQualifiedType getScopeInterfaceType(CDDefinitionSymbol cdSymbol); String getArtifactScopeSimpleName(CDDefinitionSymbol cdSymbol); String getArtifactScopeSimpleName(); String getArtifactScopeFullName(CDDefinitionSymbol cdSymbol); String getArtifactScopeFullName(); ASTMCQualifiedType getArtifactScopeType(); String getArtifactScopeInterfaceSimpleName(CDDefinitionSymbol cdSymbol); String getArtifactScopeInterfaceSimpleName(); String getArtifactScopeInterfaceFullName(CDDefinitionSymbol cdSymbol); String getArtifactScopeInterfaceFullName(); ASTMCQualifiedType getArtifactScopeInterfaceType(); String getGlobalScopeFullName(CDDefinitionSymbol cdSymbol); String getGlobalScopeFullName(); String getGlobalScopeSimpleName(CDDefinitionSymbol cdSymbol); String getGlobalScopeSimpleName(); String getGlobalScopeInterfaceFullName(CDDefinitionSymbol cdSymbol); String getGlobalScopeInterfaceFullName(); String getGlobalScopeInterfaceSimpleName(CDDefinitionSymbol cdSymbol); String getGlobalScopeInterfaceSimpleName(); ASTMCQualifiedType getGlobalScopeInterfaceType(CDDefinitionSymbol cdSymbol); ASTMCQualifiedType getGlobalScopeInterfaceType(); String getModelLoaderClassFullName(CDDefinitionSymbol cdSymbol); String getModelLoaderClassFullName(); String getModelLoaderClassSimpleName(CDDefinitionSymbol cdSymbol); String getModelLoaderClassSimpleName(); ASTMCQualifiedType getModelLoaderType(CDDefinitionSymbol cdSymbol); ASTMCQualifiedType getModelLoaderType(); String getSymbolSurrogateFullName(ASTCDType astcdType, CDDefinitionSymbol cdSymbol); String getSymbolSurrogateFullName(ASTCDType astcdType); String getSymbolSurrogateSimpleName(ASTCDType astcdType); String getSymbolSurrogateBuilderSimpleName(ASTCDType astcdType); String getSymbolSurrogateBuilderFullName(ASTCDType astcdType, CDDefinitionSymbol cdDefinitionSymbol); String getSymbolSurrogateBuilderFullName(ASTCDType astcdType); String getSymbolResolvingDelegateInterfaceSimpleName(ASTCDType astcdType); String getSymbolResolvingDelegateInterfaceFullName(ASTCDType astcdType); String getSymbolResolvingDelegateInterfaceFullName(ASTCDType astcdType, CDDefinitionSymbol cdDefinitionSymbol); String getCommonSymbolInterfaceSimpleName(CDDefinitionSymbol cdSymbol); String getCommonSymbolInterfaceSimpleName(); String getCommonSymbolInterfaceFullName(CDDefinitionSymbol cdSymbol); String getCommonSymbolInterfaceFullName(); String getSymbolTableCreatorSimpleName(CDDefinitionSymbol cdSymbol); String getSymbolTableCreatorSimpleName(); String getSymbolTableCreatorFullName(CDDefinitionSymbol cdSymbol); String getSymbolTableCreatorFullName(); String getSymbolTableCreatorDelegatorSimpleName(CDDefinitionSymbol cdSymbol); String getSymbolTableCreatorDelegatorSimpleName(); String getSymbolTableCreatorDelegatorFullName(CDDefinitionSymbol cdSymbol); String getSymbolTableCreatorDelegatorFullName(); String getScopeDeSerSimpleName(CDDefinitionSymbol cdSymbol); String getScopeDeSerSimpleName(); String getScopeDeSerFullName(CDDefinitionSymbol cdSymbol); String getScopeDeSerFullName(); String getSymTabMillSimpleName(CDDefinitionSymbol cdSymbol); String getSymTabMillSimpleName(); String getSymTabMillFullName(CDDefinitionSymbol cdSymbol); String getSymTabMillFullName(); String getSuperSTCForSubSTCSimpleName(CDDefinitionSymbol superCDSymbol, CDDefinitionSymbol subCDSymbol); String getSuperSTCForSubSTCSimpleName(CDDefinitionSymbol superCDSymbol); String getSuperSTCForSubSTCFullName(CDDefinitionSymbol superCDSymbol, CDDefinitionSymbol cdSymbol); String getSuperSTCForSubSTCFullName(CDDefinitionSymbol superCDSymbol); String getSymbolDeSerFullName(ASTCDType astcdType, CDDefinitionSymbol cdSymbol); String getSymbolDeSerFullName(ASTCDType astcdType); String getSymbolDeSerSimpleName(ASTCDType astcdType); String getSymbolTablePrinterSimpleName(CDDefinitionSymbol cdSymbol); String getSymbolTablePrinterSimpleName(); String getSymbolTablePrinterFullName(CDDefinitionSymbol cdSymbol); String getSymbolTablePrinterFullName(); ASTMCQualifiedType getJsonPrinterType(); String getNameWithSymbolSuffix(ASTCDType clazz); String getSymbolSimpleName(ASTCDType clazz); String getSymbolFullName(ASTCDType clazz); String getSymbolFullName(ASTCDType clazz, CDDefinitionSymbol cdDefinitionSymbol); Optional<String> getDefiningSymbolFullName(ASTCDType clazz); Optional<String> getDefiningSymbolFullName(ASTCDType clazz, CDDefinitionSymbol cdDefinitionSymbol); Optional<String> getDefiningSymbolSimpleName(ASTCDType clazz); String getSimpleNameFromSymbolName(String referencedSymbol); Set<String> retrieveSymbolNamesFromCD(CDDefinitionSymbol cdSymbol); ASTMCQualifiedType getSymbolTypeFromAstType(ASTCDType node); String getSymbolBuilderSimpleName(ASTCDType astcdType); String getSymbolBuilderFullName(ASTCDType astcdType, CDDefinitionSymbol cdDefinitionSymbol); String getSymbolBuilderFullName(ASTCDType astcdType); String getReferencedSymbolTypeName(ASTCDAttribute attribute); boolean isReferencedSymbol(ASTCDAttribute attribute); Optional<String> getSymbolTypeValue(ASTModifier modifier); Optional<ASTCDType> getTypeWithSymbolInfo(ASTCDType type); Optional<ASTCDType> getTypeWithScopeInfo(ASTCDType type); List<ASTCDType> getSymbolDefiningProds(ASTCDDefinition astcdDefinition); List<ASTCDType> getSymbolDefiningSuperProds(); List<ASTCDType> getSymbolDefiningSuperProds(CDDefinitionSymbol symbol); List<ASTCDType> getSymbolDefiningProds(List<? extends ASTCDType> astcdClasses); Map<ASTCDClass, String> getInheritedSymbolPropertyClasses(List<ASTCDClass> astcdClasses); String getInheritedSymbol(ASTCDType astcdClass ); List<ASTCDType> getNoSymbolAndScopeDefiningClasses(List<ASTCDClass> astcdClasses); List<ASTCDType> getOnlyScopeClasses(ASTCDDefinition astcdDefinition); boolean hasSymbolSpannedScope(ASTCDType symbolProd); boolean hasProd(ASTCDDefinition astcdDefinition); String removeASTPrefix(ASTCDType clazz); String removeASTPrefix(String clazzName); Optional<String> getStartProd(); Optional<String> getStartProd(ASTCDDefinition astcdDefinition); Optional<String> getStartProdASTFullName(ASTCDDefinition astcdDefinition); boolean hasStartProd(); boolean hasStartProd(ASTCDDefinition astcdDefinition); boolean hasComponentStereotype(ASTCDDefinition astcdDefinition); boolean hasInheritedSymbolStereotype(ASTModifier modifier); boolean hasInheritedScopeStereotype(ASTModifier modifier); boolean hasComponentStereotype(ASTModifier modifier); boolean hasStartProdStereotype(ASTModifier modifier); boolean hasShadowingStereotype(ASTModifier modifier); boolean hasNonExportingStereotype(ASTModifier modifier); boolean hasOrderedStereotype(ASTModifier modifier); Optional<String> getStartProdValue(ASTModifier modifier); String determineReturnType(ASTMCType type);  }
@Test public void testHasStartProdWithCDDefinitionStereotype() throws IOException { CD4AnalysisParser cd4AnalysisParser = new CD4AnalysisParser(); Optional<ASTCDDefinition> astcdDefinition = cd4AnalysisParser.parse_StringCDDefinition( "<<startProd=\"_ast.ASTFoo\">> public classdiagram Bar {}"); assertTrue(astcdDefinition.isPresent()); assertFalse(cd4AnalysisParser.hasErrors()); assertTrue(symTabService.hasStartProd(astcdDefinition.get())); }
@Test public void testHasStartProdFromClass() throws IOException { CD4AnalysisParser cd4AnalysisParser = new CD4AnalysisParser(); Optional<ASTCDDefinition> astcdDefinition = cd4AnalysisParser.parse_StringCDDefinition( " public classdiagram Bar {" + "<<startProd>> public class ASTFoo{}" + "}"); assertTrue(astcdDefinition.isPresent()); assertFalse(cd4AnalysisParser.hasErrors()); assertTrue(symTabService.hasStartProd(astcdDefinition.get())); }
@Test public void testHasStartProdFromInterface() throws IOException { CD4AnalysisParser cd4AnalysisParser = new CD4AnalysisParser(); Optional<ASTCDDefinition> astcdDefinition = cd4AnalysisParser.parse_StringCDDefinition( " public classdiagram Bar {" + "<<startProd>> public interface ASTFoo{}" + "}"); assertTrue(astcdDefinition.isPresent()); assertFalse(cd4AnalysisParser.hasErrors()); assertTrue(symTabService.hasStartProd(astcdDefinition.get())); }