/*
  * (non-Javadoc)
  *
  * @see de.fosd.jdime.common.Artifact#initializeChildren()
  */
 @Override
 public final void initializeChildren() {
   assert (astnode != null);
   ArtifactList<ASTNodeArtifact> children = new ArtifactList<>();
   for (int i = 0; i < astnode.getNumChildNoTransform(); i++) {
     ASTNodeArtifact child = new ASTNodeArtifact(astnode.getChild(i));
     child.setParent(this);
     child.setRevision(getRevision());
     children.add(child);
   }
   setChildren(children);
 }
Beispiel #2
0
 // This is the default node case. We recurse on the children from left to right,
 // so we're traversing the AST depth-first.
 @Override
 public void caseASTNode(ASTNode node) {
   for (int i = 0; i < node.getNumChild(); ++i) {
     node.getChild(i).analyze(this);
   }
 }