public OclRoot getFeature(String name) {
   if (name.equals("boundNames")) {
     HashSet boundNames = tree.getBoundNames(node);
     HashSet result = new HashSet();
     Iterator iter = boundNames.iterator();
     while (iter.hasNext()) {
       String s = (String) iter.next();
       result.add(new OclString((String) s));
     }
     return new OclSet(result);
   } else if (name.equals("subnodes")) {
     SubnodeCollector sc = new SubnodeCollector(node);
     node.apply(sc);
     return new OclSet(sc.subnodes);
   } else if (name.equals("supernodes")) {
     HashSet result = new HashSet();
     Node parent = node.parent();
     while (parent != null) {
       result.add(new SableOclAnyImpl(parent, tree));
       parent = parent.parent();
     }
     return new OclSet(result);
   } else {
     return super.getFeature(name);
   }
 }
Beispiel #2
0
  public void findLexerPriorities(Node ast) {

    ast.apply(new DeclarationFinder.LexerPrioritiesFinder(this));
  }
Beispiel #3
0
  private void findTransformations(Node ast) {

    ast.apply(new DeclarationFinder.TransformationsFinder(this));
  }