jaxws/src/share/classes/com/sun/codemodel/internal/JForEach.java
changeset 2678 57cf2a1c1a05
parent 8 474761f14bca
child 2719 99d59312294b
--- a/jaxws/src/share/classes/com/sun/codemodel/internal/JForEach.java	Wed Jul 05 16:49:07 2017 +0200
+++ b/jaxws/src/share/classes/com/sun/codemodel/internal/JForEach.java	Mon Apr 20 15:14:39 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,6 @@
  * CA 95054 USA or visit www.sun.com if you need additional information or
  * have any questions.
  */
-
 package com.sun.codemodel.internal;
 
 /**
@@ -34,17 +33,17 @@
  */
 public final class JForEach implements JStatement {
 
-        private final JType type;
-        private final String var;
-        private JBlock body = null; // lazily created
-        private final JExpression collection;
+    private final JType type;
+    private final String var;
+    private JBlock body = null; // lazily created
+    private final JExpression collection;
     private final JVar loopVar;
 
-        public JForEach(JType vartype, String variable, JExpression collection) {
+    public JForEach(JType vartype, String variable, JExpression collection) {
 
-                this.type = vartype;
-                this.var = variable;
-                this.collection = collection;
+        this.type = vartype;
+        this.var = variable;
+        this.collection = collection;
         loopVar = new JVar(JMods.forVar(JMod.NONE), type, var, collection);
     }
 
@@ -52,24 +51,24 @@
     /**
      * Returns a reference to the loop variable.
      */
-        public JVar var() {
-                return loopVar;
-        }
+    public JVar var() {
+        return loopVar;
+    }
 
-        public JBlock body() {
-                if (body == null)
-                        body = new JBlock();
-                return body;
-        }
+    public JBlock body() {
+        if (body == null)
+            body = new JBlock();
+        return body;
+    }
 
-        public void state(JFormatter f) {
-                f.p("for (");
-                f.g(type).id(var).p(": ").g(collection);
-                f.p(')');
-                if (body != null)
-                        f.g(body).nl();
-                else
-                        f.p(';').nl();
-        }
+    public void state(JFormatter f) {
+        f.p("for (");
+        f.g(type).id(var).p(": ").g(collection);
+        f.p(')');
+        if (body != null)
+            f.g(body).nl();
+        else
+            f.p(';').nl();
+    }
 
 }