2424/**
2525 * AnalysisVisitor converts a JavaParser parse tree into a list of {@link Description} objects. The
2626 * resulting Descriptions may in turn have lists of children, forming a tree. Only the subset of the
27- * AST that is relevant for LivingDocumentation is described. Types are resolved to their fully
28- * qualified names.
27+ * AST that is relevant for DendroDocs is described. Types are resolved to their fully qualified names.
2928 */
3029public class AnalysisVisitor extends GenericListVisitorAdapter <Description , Analyzer > {
3130
@@ -80,12 +79,12 @@ private List<String> resolve(List<ClassOrInterfaceType> types) {
8079 return types .stream ().map (this ::resolve ).toList ();
8180 }
8281
83- /** Computes an OR-combined LivingDocumentation bitmask for a NodeList of JavaParser Modifiers. */
82+ /** Computes an OR-combined DendroDocs bitmask for a NodeList of JavaParser Modifiers. */
8483 private int combine (NodeList <com .github .javaparser .ast .Modifier > modifiers ) {
8584 return modifiers .stream ().mapToInt (m -> Modifier .valueOf (m ).mask ()).reduce (0 , (a , b ) -> a | b );
8685 }
8786
88- /** Describes an annotation (Java) as an Attribute (LivingDocumentation ) with given arguments. */
87+ /** Describes an annotation (Java) as an Attribute (DendroDocs ) with given arguments. */
8988 private List <Description > visitAnnotation (AnnotationExpr n , List <Description > args ) {
9089 String type = resolve (n );
9190 return List .of (new AttributeDescription (type , n .getNameAsString (), args ));
@@ -332,7 +331,7 @@ public List<Description> visit(IfStmt n, Analyzer arg) {
332331 if (n .hasElseBranch ()) {
333332 List <Description > alternative = n .getElseStmt ().orElseThrow ().accept (this , arg );
334333
335- /* Flatten if-else trees. In LivingDocumentation JSON, a big tree of if-else structures "goes
334+ /* Flatten if-else trees. In DendroDocs JSON, a big tree of if-else structures "goes
336335 * with" the topmost if; instead of each if having one or two branches, we think of it having
337336 * many branches. */
338337 if (n .hasCascadingIfStmt () && alternative .get (0 ) instanceof IfDescription alt ) {
@@ -359,7 +358,7 @@ public List<Description> visit(SwitchStmt n, Analyzer arg) {
359358 return List .of (new SwitchDescription (head , n .getEntries ().accept (this , arg )));
360359 }
361360
362- /** Describe a single <code>switch</code> entry (JavaParser) or section (LivingDocumentation ). */
361+ /** Describe a single <code>switch</code> entry (JavaParser) or section (DendroDocs ). */
363362 @ Override
364363 public List <Description > visit (SwitchEntry n , Analyzer arg ) {
365364 List <String > labels = n .getLabels ().stream ().map (Node ::toString ).toList ();
0 commit comments