Added JavaDoc comments.

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@37 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/cfg/Compilation.java b/dev/core/src/com/google/gwt/dev/cfg/Compilation.java
index 72b2b50..5c70ef5 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/Compilation.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/Compilation.java
@@ -21,6 +21,11 @@
 import java.util.HashMap;
 import java.util.Map;
 
+/**
+ * Represents a single completed compilation.
+ * 
+ * @see Compilations
+ */
 public class Compilation {
 
   private Map rebindDecisions = new HashMap();
@@ -70,7 +75,7 @@
       // Error to try to change the existing mapping
       if (!recodedOutputName.equals(outputTypeName)) {
         String msg = "Decision '" + recodedOutputName
-          + "' already recorded for '" + inputTypeName + "'";
+            + "' already recorded for '" + inputTypeName + "'";
         throw new IllegalStateException(msg);
       }
       // already recorded this one
@@ -80,10 +85,12 @@
     // this was a new entry
     return true;
   }
+
   public void recordGeneratedTypeHash(String generatedTypeName,
       String sourceHash) {
     sourceHashByGeneratedTypeName.put(generatedTypeName, sourceHash);
   }
+
   public void setStrongName(String strongName) {
     this.strongName = strongName;
   }
diff --git a/dev/core/src/com/google/gwt/dev/cfg/CompilationSchema.java b/dev/core/src/com/google/gwt/dev/cfg/CompilationSchema.java
index 212a3b0..61ee3ae 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/CompilationSchema.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/CompilationSchema.java
@@ -17,6 +17,9 @@
 
 import com.google.gwt.dev.util.xml.Schema;
 
+/**
+ * The XML schema class to parse XML for deferred binding conditions.
+ */
 public class CompilationSchema extends Schema {
 
   private final class BodySchema extends Schema {
diff --git a/dev/core/src/com/google/gwt/dev/cfg/Compilations.java b/dev/core/src/com/google/gwt/dev/cfg/Compilations.java
index 27cd982..1cac6c7 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/Compilations.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/Compilations.java
@@ -23,6 +23,12 @@
 import java.util.Iterator;
 import java.util.List;
 
+/**
+ * Manages a set of {@link Compilation} objects keyed by deferred binding
+ * decisions. This class encapsulaes the idea of caching a set of compilations,
+ * some of which may be reusable between permutations to avoid redundant
+ * recompilation.
+ */
 public class Compilations {
 
   private final List list = new ArrayList();
diff --git a/dev/core/src/com/google/gwt/dev/cfg/CompoundCondition.java b/dev/core/src/com/google/gwt/dev/cfg/CompoundCondition.java
index 40f99ce..b9ff8de 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/CompoundCondition.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/CompoundCondition.java
@@ -15,6 +15,10 @@
  */
 package com.google.gwt.dev.cfg;
 
+/**
+ * Abstract base class for various kinds of compound deferred binding
+ * conditions.
+ */
 public abstract class CompoundCondition extends Condition {
 
   private final Conditions conditions = new Conditions();
diff --git a/dev/core/src/com/google/gwt/dev/cfg/Condition.java b/dev/core/src/com/google/gwt/dev/cfg/Condition.java
index 5b9f57f..e93c1cc 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/Condition.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/Condition.java
@@ -19,6 +19,9 @@
 import com.google.gwt.core.ext.TreeLogger;
 import com.google.gwt.core.ext.UnableToCompleteException;
 
+/**
+ * Abstract base class for various kinds of deferred binding conditions.
+ */
 public abstract class Condition {
   public final boolean isTrue(TreeLogger logger, GeneratorContext context,
       String testType) throws UnableToCompleteException {
diff --git a/dev/core/src/com/google/gwt/dev/cfg/ConditionAll.java b/dev/core/src/com/google/gwt/dev/cfg/ConditionAll.java
index 011b58a..e8f948e 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/ConditionAll.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/ConditionAll.java
@@ -21,6 +21,10 @@
 
 import java.util.Iterator;
 
+/**
+ * A compound condition that is only satisfied if all of its children are
+ * satisfied.
+ */
 public class ConditionAll extends CompoundCondition {
 
   public ConditionAll() {
diff --git a/dev/core/src/com/google/gwt/dev/cfg/ConditionAny.java b/dev/core/src/com/google/gwt/dev/cfg/ConditionAny.java
index 1770249..7273f12 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/ConditionAny.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/ConditionAny.java
@@ -21,6 +21,9 @@
 
 import java.util.Iterator;
 
+/**
+ * A compound condition that is satisfied if any of its children are satisfied.
+ */
 public class ConditionAny extends CompoundCondition {
 
   public ConditionAny() {
diff --git a/dev/core/src/com/google/gwt/dev/cfg/ConditionNone.java b/dev/core/src/com/google/gwt/dev/cfg/ConditionNone.java
index 5b0a522..5134914 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/ConditionNone.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/ConditionNone.java
@@ -21,6 +21,10 @@
 
 import java.util.Iterator;
 
+/**
+ * A compound condition that is only satisfied if all of its children are
+ * unsatisfied.
+ */
 public class ConditionNone extends CompoundCondition {
 
   public ConditionNone() {
diff --git a/dev/core/src/com/google/gwt/dev/cfg/ConditionWhenPropertyIs.java b/dev/core/src/com/google/gwt/dev/cfg/ConditionWhenPropertyIs.java
index d8ac642..abd03b1 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/ConditionWhenPropertyIs.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/ConditionWhenPropertyIs.java
@@ -21,6 +21,10 @@
 import com.google.gwt.core.ext.TreeLogger;
 import com.google.gwt.core.ext.UnableToCompleteException;
 
+/**
+ * A deferred binding condition to determine whether a named property has a
+ * particular value.
+ */
 public class ConditionWhenPropertyIs extends Condition {
 
   private final String propName;
diff --git a/dev/core/src/com/google/gwt/dev/cfg/ConditionWhenTypeAssignableTo.java b/dev/core/src/com/google/gwt/dev/cfg/ConditionWhenTypeAssignableTo.java
index 26a872a..bc8e472 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/ConditionWhenTypeAssignableTo.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/ConditionWhenTypeAssignableTo.java
@@ -22,6 +22,10 @@
 import com.google.gwt.core.ext.typeinfo.TypeOracle;
 import com.google.gwt.dev.util.Util;
 
+/**
+ * A deferred binding condition to determine whether the type being rebound is
+ * assignment-compatible with a particular type.
+ */
 public class ConditionWhenTypeAssignableTo extends Condition {
 
   private final String assignableToTypeName;
diff --git a/dev/core/src/com/google/gwt/dev/cfg/ConditionWhenTypeIs.java b/dev/core/src/com/google/gwt/dev/cfg/ConditionWhenTypeIs.java
index 70427a4..732d78c 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/ConditionWhenTypeIs.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/ConditionWhenTypeIs.java
@@ -18,6 +18,10 @@
 import com.google.gwt.core.ext.GeneratorContext;
 import com.google.gwt.core.ext.TreeLogger;
 
+/**
+ * A deferred binding condition to determine whether the type being rebound is
+ * exactly a particular type.
+ */
 public class ConditionWhenTypeIs extends Condition {
 
   private final String exactTypeName;
diff --git a/dev/core/src/com/google/gwt/dev/cfg/Conditions.java b/dev/core/src/com/google/gwt/dev/cfg/Conditions.java
index 3127d34..e18dd95 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/Conditions.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/Conditions.java
@@ -19,6 +19,9 @@
 import java.util.Iterator;
 import java.util.List;
 
+/**
+ * A typed collection of {@link Condition} objects.
+ */
 public class Conditions {
 
   private final List list = new ArrayList();
diff --git a/dev/core/src/com/google/gwt/dev/cfg/DefaultPropertyProvider.java b/dev/core/src/com/google/gwt/dev/cfg/DefaultPropertyProvider.java
index 47a54f5..d3d589e 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/DefaultPropertyProvider.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/DefaultPropertyProvider.java
@@ -26,8 +26,17 @@
 import java.io.IOException;
 import java.io.StringReader;
 
+/**
+ * A property provider that reports property values specified literally in a
+ * host HTML page.
+ */
 public class DefaultPropertyProvider extends PropertyProvider {
 
+  /*
+   * TODO: this references 'parent' literally, which could be a problem if you
+   * were to include the selector script in the host page itself rather than in
+   * an iframe.
+   */
   public DefaultPropertyProvider(Property property) {
     super(property);
     String src = "function () {";
diff --git a/dev/core/src/com/google/gwt/dev/cfg/Messages.java b/dev/core/src/com/google/gwt/dev/cfg/Messages.java
index c24abad..a15b208 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/Messages.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/Messages.java
@@ -20,29 +20,32 @@
 import com.google.gwt.dev.util.msg.Message1String;
 import com.google.gwt.dev.util.msg.Message2ClassClass;
 
+/**
+ * User messages related to configuration.
+ */
 class Messages {
 
   public static final Message2ClassClass INVALID_CLASS_DERIVATION = new Message2ClassClass(
-    TreeLogger.ERROR, "Class '$0' must derive from '$1'");
+      TreeLogger.ERROR, "Class '$0' must derive from '$1'");
 
   public static final Message1String PROPERTY_NAME_INVALID = new Message1String(
-    TreeLogger.ERROR, "Invalid property name '$0'");
+      TreeLogger.ERROR, "Invalid property name '$0'");
 
   public static final Message1String PROPERTY_NOT_FOUND = new Message1String(
-    TreeLogger.ERROR, "Property '$0' not found");
+      TreeLogger.ERROR, "Property '$0' not found");
 
   public static final Message1String PROPERTY_VALUE_INVALID = new Message1String(
-    TreeLogger.ERROR, "Invalid property value '$0'");
+      TreeLogger.ERROR, "Invalid property value '$0'");
 
   public static final Message0 PUBLIC_PATH_LOCATIONS = new Message0(
-    TreeLogger.TRACE, "Public resources found in...");
+      TreeLogger.TRACE, "Public resources found in...");
 
   public static final Message0 SOURCE_PATH_LOCATIONS = new Message0(
-    TreeLogger.TRACE, "Translatable source found in...");
+      TreeLogger.TRACE, "Translatable source found in...");
 
   public static final Message1String UNABLE_TO_CREATE_OBJECT = new Message1String(
-    TreeLogger.ERROR, "Unable to create an instance of '$0'");
+      TreeLogger.ERROR, "Unable to create an instance of '$0'");
 
   public static final Message1String UNABLE_TO_LOAD_CLASS = new Message1String(
-    TreeLogger.ERROR, "Unable to load class '$0'");
+      TreeLogger.ERROR, "Unable to load class '$0'");
 }
diff --git a/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java b/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
index a659c65..9187655 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
@@ -44,7 +44,8 @@
 import java.util.Map.Entry;
 
 /**
- * Represents a module specification.
+ * Represents a module specification. In principle, this could be built without
+ * XML for unit tests.
  */
 public class ModuleDef {
 
diff --git a/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java b/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java
index 0c207ad..f0f79fc 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java
@@ -32,6 +32,9 @@
 import java.util.Map;
 import java.util.Set;
 
+/**
+ * The top-level API for loading module XML.
+ */
 public class ModuleDefLoader {
 
   // Should always be true. If it is false complete type oracle analysis and
diff --git a/dev/core/src/com/google/gwt/dev/cfg/Properties.java b/dev/core/src/com/google/gwt/dev/cfg/Properties.java
index 24580c0..4ae9ee7 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/Properties.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/Properties.java
@@ -21,6 +21,9 @@
 import java.util.Iterator;
 import java.util.Map;
 
+/**
+ * A typed map of deferred binding properties.
+ */
 public class Properties {
 
   private final Map map = new HashMap();
diff --git a/dev/core/src/com/google/gwt/dev/cfg/Property.java b/dev/core/src/com/google/gwt/dev/cfg/Property.java
index c3a6635..ec48e62 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/Property.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/Property.java
@@ -19,6 +19,10 @@
 import java.util.HashSet;
 import java.util.Set;
 
+/**
+ * Represents a single named deferred binding property that can answer with its
+ * value.
+ */
 public class Property implements Comparable {
 
   private String activeValue;
diff --git a/dev/core/src/com/google/gwt/dev/cfg/PropertyProvider.java b/dev/core/src/com/google/gwt/dev/cfg/PropertyProvider.java
index 3397f76..3657ac2 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/PropertyProvider.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/PropertyProvider.java
@@ -17,6 +17,9 @@
 
 import com.google.gwt.dev.js.ast.JsBlock;
 
+/**
+ * Produces a deferred binding property value by executing JavaScript code.
+ */
 public class PropertyProvider {
 
   private JsBlock body;
diff --git a/dev/core/src/com/google/gwt/dev/cfg/Rule.java b/dev/core/src/com/google/gwt/dev/cfg/Rule.java
index e995e5f..34e29aa 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/Rule.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/Rule.java
@@ -19,6 +19,9 @@
 import com.google.gwt.core.ext.TreeLogger;
 import com.google.gwt.core.ext.UnableToCompleteException;
 
+/**
+ * Abstract base class for various kinds of deferred binding rules.
+ */
 public abstract class Rule {
 
   private final ConditionAll rootCondition = new ConditionAll();
diff --git a/dev/core/src/com/google/gwt/dev/cfg/RuleFail.java b/dev/core/src/com/google/gwt/dev/cfg/RuleFail.java
index 84db434..2324678 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/RuleFail.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/RuleFail.java
@@ -19,6 +19,9 @@
 import com.google.gwt.core.ext.TreeLogger;
 import com.google.gwt.core.ext.UnableToCompleteException;
 
+/**
+ * A rule to explicitly fail during a deferred binding requrest.
+ */
 public class RuleFail extends Rule {
 
   public String realize(TreeLogger logger, GeneratorContext context,
diff --git a/dev/core/src/com/google/gwt/dev/cfg/RuleGenerateWith.java b/dev/core/src/com/google/gwt/dev/cfg/RuleGenerateWith.java
index 11fb88c..83481f0 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/RuleGenerateWith.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/RuleGenerateWith.java
@@ -20,6 +20,11 @@
 import com.google.gwt.core.ext.TreeLogger;
 import com.google.gwt.core.ext.UnableToCompleteException;
 
+/**
+ * A rule to replace the type being rebound with a class whose name is
+ * determined by a generator class. Generators usually generate new classes
+ * during the deferred binding process, but it is not required.
+ */
 public class RuleGenerateWith extends Rule {
 
   private final Generator generator;
diff --git a/dev/core/src/com/google/gwt/dev/cfg/RuleReplaceWith.java b/dev/core/src/com/google/gwt/dev/cfg/RuleReplaceWith.java
index b008ceb..4795f31 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/RuleReplaceWith.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/RuleReplaceWith.java
@@ -19,6 +19,9 @@
 import com.google.gwt.core.ext.TreeLogger;
 import com.google.gwt.core.ext.UnableToCompleteException;
 
+/**
+ * A rule to replace the type being rebound with an explicitly named class.
+ */
 public class RuleReplaceWith extends Rule {
 
   private final String replacementTypeName;
diff --git a/dev/core/src/com/google/gwt/dev/cfg/Rules.java b/dev/core/src/com/google/gwt/dev/cfg/Rules.java
index f499891..f27e7ca 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/Rules.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/Rules.java
@@ -18,6 +18,9 @@
 import java.util.Iterator;
 import java.util.LinkedList;
 
+/**
+ * A typed collection of {@link Rule} objects.
+ */
 public class Rules {
 
   private final LinkedList list = new LinkedList();
diff --git a/dev/core/src/com/google/gwt/dev/cfg/StaticPropertyOracle.java b/dev/core/src/com/google/gwt/dev/cfg/StaticPropertyOracle.java
index b1662f9..7cdea17 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/StaticPropertyOracle.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/StaticPropertyOracle.java
@@ -19,6 +19,10 @@
 import com.google.gwt.core.ext.PropertyOracle;
 import com.google.gwt.core.ext.TreeLogger;
 
+/**
+ * An implementation of {@link PropertyOracle} that maintains explicit property
+ * values, rather than computing them.
+ */
 public class StaticPropertyOracle implements PropertyOracle {
 
   private Property[] currentProps;