Exemplo n.º 1
0
 // Declared in VariableDeclaration.jrag at line 139
 private VariableDeclaration rewriteRule0() {
   {
     VariableDeclaration decl =
         getVariableDecl(0).createVariableDeclarationFrom(getModifiers(), getTypeAccess());
     decl.setStart(start); // copy location information
     decl.setEnd(end); // copy location information
     return decl;
   }
 }
Exemplo n.º 2
0
 private List createVariableDeclarationList() {
   List varList = new List();
   for (int j = 0; j < getNumVariableDecl(); j++) {
     VariableDeclaration v =
         getVariableDecl(j)
             .createVariableDeclarationFrom(
                 (Modifiers) getModifiers().fullCopy(), (Access) getTypeAccess().fullCopy());
     if (j == 0) v.setStart(start);
     varList.add(v);
   }
   return varList;
 }
Exemplo n.º 3
0
 public Variable getVariable() {
   if (!bound) {
     bound = true;
     int position = find(statementList, after);
     VariableDeclaration varDecl =
         new VariableDeclaration(
             OJUtil.toTypeName(type, typeFactory), variable.toString(), null);
     statementList.insertElementAt(varDecl, position);
     varDecl.setInitializer(thunk.getInitializer());
   }
   return variable;
 }