ordercheck passes.
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@31 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/change/AddAll.java b/dev/core/src/com/google/gwt/dev/jjs/ast/change/AddAll.java
index 6232c47..73cc64d 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/change/AddAll.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/change/AddAll.java
@@ -1,22 +1,44 @@
-// Copyright 2006 Google Inc. All Rights Reserved.
+/*
+ * Copyright 2006 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package com.google.gwt.dev.jjs.ast.change;
import com.google.gwt.core.ext.TreeLogger;
import java.util.List;
-class AddAll/*<N extends JNode>*/ extends ChangeBase {
+class AddAll/* <N extends JNode> */extends ChangeBase {
- final List/*<N>*/ source;
+ final List/* <N> */source;
+ final List/* <N> */list;
private final int index;
- final List/*<N>*/ list;
- public AddAll(List/*<N>*/ source, int index, List/*<N>*/ list) {
+ public AddAll(List/* <N> */source, int index, List/* <N> */list) {
this.source = source;
this.index = index;
this.list = list;
}
+ public void apply() {
+ if (index < 0) {
+ list.addAll(source);
+ } else {
+ list.addAll(index, source);
+ }
+ }
+
public void describe(TreeLogger logger, TreeLogger.Type type) {
if (index < 0) {
logger.log(type, "Add a list to a list", null);
@@ -25,12 +47,4 @@
}
}
- public void apply() {
- if (index < 0) {
- list.addAll(source);
- } else {
- list.addAll(index, source);
- }
- }
-
}
\ No newline at end of file
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/change/AddNode.java b/dev/core/src/com/google/gwt/dev/jjs/ast/change/AddNode.java
index af59a24..509a382 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/change/AddNode.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/change/AddNode.java
@@ -1,4 +1,18 @@
-// Copyright 2006 Google Inc. All Rights Reserved.
+/*
+ * Copyright 2006 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package com.google.gwt.dev.jjs.ast.change;
import com.google.gwt.core.ext.TreeLogger;
@@ -6,31 +20,19 @@
import java.util.List;
-class AddNode/*<N extends JNode>*/ extends ChangeBase {
+class AddNode/* <N extends JNode> */extends ChangeBase {
+ final List/* <N> */list;
private final JNode node;
private final int index;
- final List/*<N>*/ list;
- public AddNode(JNode node, int index, List/*<N>*/ list) {
+ public AddNode(JNode node, int index, List/* <N> */list) {
this.node = node;
this.index = index;
this.list = list;
assert (!list.contains(node));
}
- public void describe(TreeLogger logger, TreeLogger.Type type) {
- if (index < 0) {
- logger.log(type, "Add " + ChangeList.getNodeString(node)
- + ChangeList.getEnclosingTypeString(" to the end of", node), null);
- } else {
- logger.log(type,
- "Add " + ChangeList.getNodeString(node)
- + ChangeList.getEnclosingTypeString(" to", node) + " at index "
- + index, null);
- }
- }
-
public void apply() {
if (index < 0) {
list.add(node);
@@ -39,4 +41,15 @@
}
}
+ public void describe(TreeLogger logger, TreeLogger.Type type) {
+ if (index < 0) {
+ logger.log(type, "Add " + ChangeList.getNodeString(node)
+ + ChangeList.getEnclosingTypeString(" to the end of", node), null);
+ } else {
+ logger.log(type, "Add " + ChangeList.getNodeString(node)
+ + ChangeList.getEnclosingTypeString(" to", node) + " at index "
+ + index, null);
+ }
+ }
+
}
\ No newline at end of file
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/change/AddNodeMutator.java b/dev/core/src/com/google/gwt/dev/jjs/ast/change/AddNodeMutator.java
index 585b46e..4f06e28 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/change/AddNodeMutator.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/change/AddNodeMutator.java
@@ -1,4 +1,18 @@
-// Copyright 2006 Google Inc. All Rights Reserved.
+/*
+ * Copyright 2006 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package com.google.gwt.dev.jjs.ast.change;
import com.google.gwt.core.ext.TreeLogger;
@@ -6,30 +20,19 @@
import java.util.List;
-class AddNodeMutator/*<N extends JNode>*/ extends ChangeBase {
+class AddNodeMutator/* <N extends JNode> */extends ChangeBase {
- private final Mutator/*<N>*/ node;
+ final List/* <N> */list;
+ private final Mutator/* <N> */node;
private final int index;
- final List/*<N>*/ list;
- public AddNodeMutator(Mutator/*<N>*/ node, int index, List/*<N>*/ list) {
+ public AddNodeMutator(Mutator/* <N> */node, int index, List/* <N> */list) {
this.node = node;
this.index = index;
this.list = list;
assert (!list.contains(node));
}
- public void describe(TreeLogger logger, TreeLogger.Type type) {
- if (index < 0) {
- logger.log(type, "Add the eventual value of "
- + ChangeList.getNodeString(node.get()) + " to a list", null);
- } else {
- logger.log(type,
- "Add the eventual value of " + ChangeList.getNodeString(node.get())
- + " to a list at index " + index, null);
- }
- }
-
public void apply() {
assert (!list.contains(node));
if (index < 0) {
@@ -39,4 +42,15 @@
}
}
+ public void describe(TreeLogger logger, TreeLogger.Type type) {
+ if (index < 0) {
+ logger.log(type, "Add the eventual value of "
+ + ChangeList.getNodeString(node.get()) + " to a list", null);
+ } else {
+ logger.log(type, "Add the eventual value of "
+ + ChangeList.getNodeString(node.get()) + " to a list at index "
+ + index, null);
+ }
+ }
+
}
\ No newline at end of file
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/change/Change.java b/dev/core/src/com/google/gwt/dev/jjs/ast/change/Change.java
index 2913e75..ac79b3c 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/change/Change.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/change/Change.java
@@ -1,4 +1,18 @@
-// Copyright 2006 Google Inc. All Rights Reserved.
+/*
+ * Copyright 2006 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package com.google.gwt.dev.jjs.ast.change;
import com.google.gwt.core.ext.TreeLogger;
@@ -7,8 +21,9 @@
* Interface implemented by classes that apply changes to a set of statements.
*/
public interface Change {
-
+
void describe(TreeLogger logger, TreeLogger.Type type);
+
void apply();
// void undo();
// void verify();
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/change/ChangeBase.java b/dev/core/src/com/google/gwt/dev/jjs/ast/change/ChangeBase.java
index 4700230..979bb92 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/change/ChangeBase.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/change/ChangeBase.java
@@ -1,4 +1,18 @@
-// Copyright 2006 Google Inc. All Rights Reserved.
+/*
+ * Copyright 2006 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package com.google.gwt.dev.jjs.ast.change;
import com.google.gwt.core.ext.TreeLogger;
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/change/ChangeList.java b/dev/core/src/com/google/gwt/dev/jjs/ast/change/ChangeList.java
index d09d7d9..4c453a0 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/change/ChangeList.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/change/ChangeList.java
@@ -1,4 +1,18 @@
-// Copyright 2006 Google Inc. All Rights Reserved.
+/*
+ * Copyright 2006 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package com.google.gwt.dev.jjs.ast.change;
import com.google.gwt.core.ext.TreeLogger;
@@ -20,43 +34,6 @@
public class ChangeList extends ChangeBase {
- private final List/*<Change>*/ changes = new ArrayList/*<Change>*/();
- private final String description;
-
- public ChangeList(String description) {
- this.description = description;
- }
-
- public void describe(TreeLogger logger, TreeLogger.Type type) {
- TreeLogger branch = logger.branch(type, description, null);
- for (int i = 0; i < changes.size(); ++i) {
- Change change = (Change) changes.get(i);
- change.describe(branch, type);
- }
- }
-
- public void apply() {
- for (int i = 0; i < changes.size(); ++i) {
- Change change = (Change) changes.get(i);
- change.apply();
- }
- }
-
- public void add(Change change) {
- changes.add(change);
- }
-
- public boolean empty() {
- return changes.size() == 0;
- }
-
- static String getNodeString(JNode x) {
- if (x == null) {
- return String.valueOf(x);
- }
- return x.getClass().getName() + " '" + x + "'";
- }
-
static String getEnclosingTypeString(String prefix, Object x) {
if (x instanceof HasEnclosingType) {
JReferenceType enclosingType = ((HasEnclosingType) x).getEnclosingType();
@@ -67,26 +44,36 @@
return "";
}
- public /*<N extends JNode>*/ void addAll(List/*<N>*/ x, int index, List/*<N>*/ list) {
- AddAll change = new AddAll/*<N>*/(x, index, list);
+ static String getNodeString(JNode x) {
+ if (x == null) {
+ return String.valueOf(x);
+ }
+ return x.getClass().getName() + " '" + x + "'";
+ }
+
+ private final List/* <Change> */changes = new ArrayList/* <Change> */();
+
+ private final String description;
+
+ public ChangeList(String description) {
+ this.description = description;
+ }
+
+ public void add(Change change) {
changes.add(change);
}
- public /*<N extends JNode>*/ void addNode(JNode x, int index, List/*<N>*/ list) {
- AddNode change = new AddNode/*<N>*/(x, index, list);
+ public/* <N extends JNode> */void addAll(List/* <N> */x, int index,
+ List/* <N> */list) {
+ AddAll change = new AddAll/* <N> */(x, index, list);
changes.add(change);
}
- public /*<N extends JNode>*/ void addNode(Mutator/*<N>*/ x, int index, List/*<N>*/ list) {
- AddNodeMutator change = new AddNodeMutator/*<N>*/(x, index, list);
- changes.add(change);
- }
-
- public void addExpression(JExpression x, List/*<JExpression>*/ list) {
+ public void addExpression(JExpression x, List/* <JExpression> */list) {
addNode(x, -1, list);
}
- public void addExpression(Mutator x, List/*<JExpression>*/ list) {
+ public void addExpression(Mutator x, List/* <JExpression> */list) {
addNode(x, -1, list);
}
@@ -94,44 +81,52 @@
addNode(x, -1, x.getEnclosingType().methods);
}
- public void addStatement(JStatement x, JBlock body) {
- addNode(x, -1, body.statements);
+ public/* <N extends JNode> */void addNode(JNode x, int index, List/* <N> */list) {
+ AddNode change = new AddNode/* <N> */(x, index, list);
+ changes.add(change);
+ }
+
+ public/* <N extends JNode> */void addNode(Mutator/* <N> */x, int index,
+ List/* <N> */list) {
+ AddNodeMutator change = new AddNodeMutator/* <N> */(x, index, list);
+ changes.add(change);
}
public void addStatement(JStatement x, int index, JBlock body) {
addNode(x, index, body.statements);
}
+ public void addStatement(JStatement x, JBlock body) {
+ addNode(x, -1, body.statements);
+ }
+
+ public void apply() {
+ for (int i = 0; i < changes.size(); ++i) {
+ Change change = (Change) changes.get(i);
+ change.apply();
+ }
+ }
+
public void changeType(HasSettableType x, JType type) {
TypeChange change = new TypeChange(x, type);
changes.add(change);
}
- public /*<N extends JNode>*/ void clear(List/*<N>*/ list) {
- ClearList/*<N>*/ change = new ClearList/*<N>*/(list);
+ public/* <N extends JNode> */void clear(List/* <N> */list) {
+ ClearList/* <N> */change = new ClearList/* <N> */(list);
changes.add(change);
}
- public /*<N extends JNode>*/ void removeNode(Mutator/*<N>*/ x, List/*<N>*/ list) {
- RemoveNodeMutator/*<N>*/ change = new RemoveNodeMutator/*<N>*/(x, list);
- changes.add(change);
+ public void describe(TreeLogger logger, TreeLogger.Type type) {
+ TreeLogger branch = logger.branch(type, description, null);
+ for (int i = 0; i < changes.size(); ++i) {
+ Change change = (Change) changes.get(i);
+ change.describe(branch, type);
+ }
}
- public /*<N extends JNode>*/ void removeNode(JNode x, List/*<N>*/ list) {
- RemoveNode/*<N>*/ change = new RemoveNode/*<N>*/(x, list);
- changes.add(change);
- }
-
- public void removeField(JField x) {
- removeNode(x, x.getEnclosingType().fields);
- }
-
- public void removeMethod(JMethod x) {
- removeNode(x, x.getEnclosingType().methods);
- }
-
- public void removeType(JReferenceType x) {
- removeNode(x, x.getProgram().getDeclaredTypes());
+ public boolean empty() {
+ return changes.size() == 0;
}
public void makeFinal(CanBeSetFinal x) {
@@ -146,16 +141,36 @@
changes.add(change);
}
- public void replaceExpression(Mutator original,
- Mutator replace) {
- ReplaceNodeMutator change = new ReplaceNodeMutator(original,
- replace);
+ public void removeField(JField x) {
+ removeNode(x, x.getEnclosingType().fields);
+ }
+
+ public void removeMethod(JMethod x) {
+ removeNode(x, x.getEnclosingType().methods);
+ }
+
+ public/* <N extends JNode> */void removeNode(JNode x, List/* <N> */list) {
+ RemoveNode/* <N> */change = new RemoveNode/* <N> */(x, list);
changes.add(change);
}
- public void replaceExpression(Mutator original,
- JExpression replace) {
- ReplaceNode change = new ReplaceNode/*<JExpression>*/(original, replace);
+ public/* <N extends JNode> */void removeNode(Mutator/* <N> */x,
+ List/* <N> */list) {
+ RemoveNodeMutator/* <N> */change = new RemoveNodeMutator/* <N> */(x, list);
+ changes.add(change);
+ }
+
+ public void removeType(JReferenceType x) {
+ removeNode(x, x.getProgram().getDeclaredTypes());
+ }
+
+ public void replaceExpression(Mutator original, JExpression replace) {
+ ReplaceNode change = new ReplaceNode/* <JExpression> */(original, replace);
+ changes.add(change);
+ }
+
+ public void replaceExpression(Mutator original, Mutator replace) {
+ ReplaceNodeMutator change = new ReplaceNodeMutator(original, replace);
changes.add(change);
}
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/change/ClearList.java b/dev/core/src/com/google/gwt/dev/jjs/ast/change/ClearList.java
index 2e003c4..3172358 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/change/ClearList.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/change/ClearList.java
@@ -1,24 +1,38 @@
-// Copyright 2006 Google Inc. All Rights Reserved.
+/*
+ * Copyright 2006 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package com.google.gwt.dev.jjs.ast.change;
import com.google.gwt.core.ext.TreeLogger;
import java.util.List;
-class ClearList/*<N extends JNode>*/ extends ChangeBase {
+class ClearList/* <N extends JNode> */extends ChangeBase {
- private final List/*<N>*/ list;
+ private final List/* <N> */list;
- public ClearList(List/*<N>*/ list) {
+ public ClearList(List/* <N> */list) {
this.list = list;
}
- public void describe(TreeLogger logger, TreeLogger.Type type) {
- logger.log(type, "Clear a list", null);
- }
-
public void apply() {
list.clear();
}
+ public void describe(TreeLogger logger, TreeLogger.Type type) {
+ logger.log(type, "Clear a list", null);
+ }
+
}
\ No newline at end of file
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/change/MakeFinal.java b/dev/core/src/com/google/gwt/dev/jjs/ast/change/MakeFinal.java
index 9a2c0fd..679a9a7 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/change/MakeFinal.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/change/MakeFinal.java
@@ -1,4 +1,18 @@
-// Copyright 2006 Google Inc. All Rights Reserved.
+/*
+ * Copyright 2006 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package com.google.gwt.dev.jjs.ast.change;
import com.google.gwt.core.ext.TreeLogger;
@@ -12,12 +26,12 @@
this.x = x;
}
- public void describe(TreeLogger logger, TreeLogger.Type type) {
- logger.log(type, "Make final " + ChangeList.getNodeString((JNode) x)
- + ChangeList.getEnclosingTypeString(" from", x), null);
- }
-
public void apply() {
x.setFinal(true);
}
+
+ public void describe(TreeLogger logger, TreeLogger.Type type) {
+ logger.log(type, "Make final " + ChangeList.getNodeString((JNode) x)
+ + ChangeList.getEnclosingTypeString(" from", x), null);
+ }
}
\ No newline at end of file
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/change/MoveBlock.java b/dev/core/src/com/google/gwt/dev/jjs/ast/change/MoveBlock.java
index 063224e..9e92dff 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/change/MoveBlock.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/change/MoveBlock.java
@@ -1,4 +1,18 @@
-// Copyright 2006 Google Inc. All Rights Reserved.
+/*
+ * Copyright 2006 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package com.google.gwt.dev.jjs.ast.change;
import com.google.gwt.core.ext.TreeLogger;
@@ -14,14 +28,14 @@
this.target = target;
}
- public void describe(TreeLogger logger, TreeLogger.Type type) {
- logger.log(type, "Move the body of " + ChangeList.getNodeString(source)
- + " to " + ChangeList.getNodeString(target), null);
- }
-
public void apply() {
assert (target.statements.size() == 0);
target.statements.addAll(source.statements);
source.statements.clear();
}
+
+ public void describe(TreeLogger logger, TreeLogger.Type type) {
+ logger.log(type, "Move the body of " + ChangeList.getNodeString(source)
+ + " to " + ChangeList.getNodeString(target), null);
+ }
}
\ No newline at end of file
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/change/RemoveNode.java b/dev/core/src/com/google/gwt/dev/jjs/ast/change/RemoveNode.java
index 3967faa..7d73e7e 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/change/RemoveNode.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/change/RemoveNode.java
@@ -1,4 +1,18 @@
-// Copyright 2006 Google Inc. All Rights Reserved.
+/*
+ * Copyright 2006 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package com.google.gwt.dev.jjs.ast.change;
import com.google.gwt.core.ext.TreeLogger;
@@ -6,25 +20,25 @@
import java.util.List;
-class RemoveNode/*<N extends JNode>*/ extends ChangeBase {
+class RemoveNode/* <N extends JNode> */extends ChangeBase {
+ final List/* <N> */list;
private final JNode node;
- final List/*<N>*/ list;
- public RemoveNode(JNode node, List/*<N>*/ list) {
+ public RemoveNode(JNode node, List/* <N> */list) {
this.node = node;
this.list = list;
assert (list.contains(node));
}
- public void describe(TreeLogger logger, TreeLogger.Type type) {
- logger.log(type, "Remove " + ChangeList.getNodeString(node)
- + ChangeList.getEnclosingTypeString(" from", node), null);
- }
-
public void apply() {
boolean removed = list.remove(node);
assert (removed);
}
+ public void describe(TreeLogger logger, TreeLogger.Type type) {
+ logger.log(type, "Remove " + ChangeList.getNodeString(node)
+ + ChangeList.getEnclosingTypeString(" from", node), null);
+ }
+
}
\ No newline at end of file
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/change/RemoveNodeMutator.java b/dev/core/src/com/google/gwt/dev/jjs/ast/change/RemoveNodeMutator.java
index 801e3f8..afa7e7d 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/change/RemoveNodeMutator.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/change/RemoveNodeMutator.java
@@ -1,4 +1,18 @@
-// Copyright 2006 Google Inc. All Rights Reserved.
+/*
+ * Copyright 2006 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package com.google.gwt.dev.jjs.ast.change;
import com.google.gwt.core.ext.TreeLogger;
@@ -6,25 +20,25 @@
import java.util.List;
-class RemoveNodeMutator/*<N extends JNode>*/ extends ChangeBase {
+class RemoveNodeMutator/* <N extends JNode> */extends ChangeBase {
- private final Mutator/*<N>*/ node;
- final List/*<N>*/ list;
+ final List/* <N> */list;
+ private final Mutator/* <N> */node;
- public RemoveNodeMutator(Mutator/*<N>*/ node, List/*<N>*/ list) {
+ public RemoveNodeMutator(Mutator/* <N> */node, List/* <N> */list) {
this.node = node;
this.list = list;
assert (list.contains(node.get()));
}
- public void describe(TreeLogger logger, TreeLogger.Type type) {
- logger.log(type, "Remove " + ChangeList.getNodeString(node.get())
- + ChangeList.getEnclosingTypeString(" from", node.get()), null);
- }
-
public void apply() {
boolean removed = list.remove(node.get());
assert (removed);
}
+ public void describe(TreeLogger logger, TreeLogger.Type type) {
+ logger.log(type, "Remove " + ChangeList.getNodeString(node.get())
+ + ChangeList.getEnclosingTypeString(" from", node.get()), null);
+ }
+
}
\ No newline at end of file
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/change/ReplaceNode.java b/dev/core/src/com/google/gwt/dev/jjs/ast/change/ReplaceNode.java
index cda4572..fc0100a 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/change/ReplaceNode.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/change/ReplaceNode.java
@@ -1,27 +1,41 @@
-// Copyright 2006 Google Inc. All Rights Reserved.
+/*
+ * Copyright 2006 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package com.google.gwt.dev.jjs.ast.change;
import com.google.gwt.core.ext.TreeLogger;
import com.google.gwt.dev.jjs.ast.JExpression;
import com.google.gwt.dev.jjs.ast.Mutator;
-class ReplaceNode/*<N extends JNode>*/ extends ChangeBase {
+class ReplaceNode/* <N extends JNode> */extends ChangeBase {
- final Mutator/*<N>*/ original;
+ final Mutator/* <N> */original;
final JExpression replace;
- public ReplaceNode(Mutator/*<N>*/ original, JExpression replace) {
+ public ReplaceNode(Mutator/* <N> */original, JExpression replace) {
this.original = original;
this.replace = replace;
}
- public void describe(TreeLogger logger, TreeLogger.Type type) {
- logger.log(type, "Replace " + ChangeList.getNodeString(original.get())
- + " with " + ChangeList.getNodeString(replace), null);
- }
-
public void apply() {
original.set(replace);
}
+ public void describe(TreeLogger logger, TreeLogger.Type type) {
+ logger.log(type, "Replace " + ChangeList.getNodeString(original.get())
+ + " with " + ChangeList.getNodeString(replace), null);
+ }
+
}
\ No newline at end of file
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/change/ReplaceNodeMutator.java b/dev/core/src/com/google/gwt/dev/jjs/ast/change/ReplaceNodeMutator.java
index 8f86f90..70f0668 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/change/ReplaceNodeMutator.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/change/ReplaceNodeMutator.java
@@ -1,26 +1,40 @@
-// Copyright 2006 Google Inc. All Rights Reserved.
+/*
+ * Copyright 2006 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package com.google.gwt.dev.jjs.ast.change;
import com.google.gwt.core.ext.TreeLogger;
import com.google.gwt.dev.jjs.ast.Mutator;
-class ReplaceNodeMutator/*<N extends JNode>*/ extends ChangeBase {
+class ReplaceNodeMutator/* <N extends JNode> */extends ChangeBase {
- final Mutator/*<N>*/ original;
- final Mutator/*<N>*/ replace;
+ final Mutator/* <N> */original;
+ final Mutator/* <N> */replace;
- public ReplaceNodeMutator(Mutator/*<N>*/ original, Mutator/*<N>*/ replace) {
+ public ReplaceNodeMutator(Mutator/* <N> */original, Mutator/* <N> */replace) {
this.original = original;
this.replace = replace;
}
- public void describe(TreeLogger logger, TreeLogger.Type type) {
- logger.log(type, "Replace " + ChangeList.getNodeString(original.get())
- + " with " + ChangeList.getNodeString(replace.get()), null);
- }
-
public void apply() {
original.set(replace.get());
}
+ public void describe(TreeLogger logger, TreeLogger.Type type) {
+ logger.log(type, "Replace " + ChangeList.getNodeString(original.get())
+ + " with " + ChangeList.getNodeString(replace.get()), null);
+ }
+
}
\ No newline at end of file
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/change/TypeChange.java b/dev/core/src/com/google/gwt/dev/jjs/ast/change/TypeChange.java
index b7960b9..d6f8812 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/change/TypeChange.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/change/TypeChange.java
@@ -1,4 +1,18 @@
-// Copyright 2006 Google Inc. All Rights Reserved.
+/*
+ * Copyright 2006 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package com.google.gwt.dev.jjs.ast.change;
import com.google.gwt.core.ext.TreeLogger;
@@ -11,9 +25,9 @@
*/
public class TypeChange extends ChangeBase {
+ final JType targetType;
private final HasSettableType node;
private final JType oldType;
- final JType targetType;
public TypeChange(HasSettableType node, JType targetType) {
this.node = node;
@@ -21,15 +35,15 @@
this.targetType = targetType;
}
- public void describe(TreeLogger logger, TreeLogger.Type type) {
- logger.log(type, "Change type of " + ChangeList.getNodeString((JNode) node)
- + " from " + ChangeList.getNodeString(node.getType()) + " to "
- + ChangeList.getNodeString(targetType), null);
- }
-
public void apply() {
assert (oldType == node.getType());
node.setType(targetType);
}
+ public void describe(TreeLogger logger, TreeLogger.Type type) {
+ logger.log(type, "Change type of " + ChangeList.getNodeString((JNode) node)
+ + " from " + ChangeList.getNodeString(node.getType()) + " to "
+ + ChangeList.getNodeString(targetType), null);
+ }
+
}