Skip to content

Commit af33744

Browse files
committed
Update some comments to mention DendroDocs instead of LivingDocumentation
1 parent 211256f commit af33744

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

src/main/java/dev/dendrodocs/tool/AnalysisVisitor.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
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
*/
3029
public 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();

src/main/java/dev/dendrodocs/tool/Analyzer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/**
2525
* Analyzer executes {@link AnalysisJob} instances. It walks the given source directory, parses each
2626
* Java file, then uses the {@link AnalysisVisitor} to combine the resulting parse trees into a JSON
27-
* output that follows LivingDocumentation conventions.
27+
* output that follows DendroDocs conventions.
2828
*/
2929
public class Analyzer {
3030
private final ObjectMapper objectMapper;

src/test/java/dev/dendrodocs/tool/AnalysisVisitorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ void annotation_declaration_with_fields() {
548548

549549
TypeDescription typeDescription = (TypeDescription) parsed.get(0);
550550

551-
// Note that an AnnotationMember is mapped to a living documentation Field
551+
// Note that an AnnotationMember is mapped to a DendroDocs Field
552552
TypeDescription expected =
553553
new TypeDescription.Builder(TypeType.INTERFACE, "AnnotationTest")
554554
.withModifiers(Modifier.PUBLIC.mask())
@@ -573,7 +573,7 @@ void annotation_declaration_with_field_no_default() {
573573

574574
TypeDescription typeDescription = (TypeDescription) parsed.get(0);
575575

576-
// Note that an AnnotationMember is mapped to a living documentation Field
576+
// Note that an AnnotationMember is mapped to a DendroDocs Field
577577
TypeDescription expected =
578578
new TypeDescription.Builder(TypeType.INTERFACE, "AnnotationTest")
579579
.withModifiers(Modifier.PUBLIC.mask())

src/test/java/dev/dendrodocs/tool/integritytest/SelfTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class SelfTest {
1414
@SuppressWarnings("ResultOfMethodCallIgnored")
1515
void testMain() throws IOException {
1616
String outputJson = "parserTest.json";
17-
// returns path..\ISEP-LivingDocumentation\analyzer-java
17+
// returns absolute path to directory where the project is stored
1818
String projectRoot = System.getProperty("user.dir");
1919
String projectDirectory =
2020
projectRoot + File.separator + "src" + File.separator + "main" + File.separator + "java";

0 commit comments

Comments
 (0)