Beispiel #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;
   }
 }
Beispiel #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;
 }
Beispiel #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;
 }