Added Queries.returns(). Renamed all() to any(). Excluded SourceConsumer from source tracing. Added performance check for indexing. Set version # to 1.0rc1.

git-svn-id: https://google-guice.googlecode.com/svn/trunk@79 d779f126-a31b-0410-b53b-1d3aecad763e
diff --git a/build.properties b/build.properties
index 212a2b3..989e7b6 100644
--- a/build.properties
+++ b/build.properties
@@ -1,4 +1,4 @@
-version=1.0-RC
+version=1.0rc1
 lib.dir=lib
 src.dir=src
 test.dir=test
diff --git a/guice.iws b/guice.iws
index eca8a54..9315934 100644
--- a/guice.iws
+++ b/guice.iws
@@ -18,8 +18,16 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" name="Default" comment="">
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/guice.iml" afterPath="$PROJECT_DIR$/guice.iml" />
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/guice.iws" afterPath="$PROJECT_DIR$/guice.iws" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/test/com/google/inject/intercept/QueryTest.java" afterPath="$PROJECT_DIR$/test/com/google/inject/intercept/QueryTest.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/test/com/google/inject/intercept/IntegrationTest.java" afterPath="$PROJECT_DIR$/test/com/google/inject/intercept/IntegrationTest.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/google/inject/spi/DefaultSourceProvider.java" afterPath="$PROJECT_DIR$/src/com/google/inject/spi/DefaultSourceProvider.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/google/inject/ErrorMessages.java" afterPath="$PROJECT_DIR$/src/com/google/inject/ErrorMessages.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/test/com/google/inject/intercept/ProxyFactoryTest.java" afterPath="$PROJECT_DIR$/test/com/google/inject/intercept/ProxyFactoryTest.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/test/com/google/inject/ErrorHandlingTest.java" afterPath="$PROJECT_DIR$/test/com/google/inject/ErrorHandlingTest.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/google/inject/intercept/Queries.java" afterPath="$PROJECT_DIR$/src/com/google/inject/intercept/Queries.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/google/inject/ContainerBuilder.java" afterPath="$PROJECT_DIR$/src/com/google/inject/ContainerBuilder.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/build.properties" afterPath="$PROJECT_DIR$/build.properties" />
     </list>
   </component>
   <component name="ChangeListSynchronizer" />
@@ -189,269 +197,15 @@
   </component>
   <component name="FileEditorManager">
     <leaf>
-      <file leaf-file-name="IntegrationTest.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/test/com/google/inject/intercept/IntegrationTest.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="15" column="0" selection-start="596" selection-end="596" vertical-scroll-proportion="0.4132901">
-              <folding>
-                <element signature="imports" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="AllTests.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/test/com/google/inject/AllTests.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="43" column="38" selection-start="1526" selection-end="1526" vertical-scroll-proportion="0.55105346">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="ErrorHandlingTest.java" pinned="false" current="true" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/test/com/google/inject/ErrorHandlingTest.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="40" column="0" selection-start="1039" selection-end="1039" vertical-scroll-proportion="0.7163695">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="ContainerBuilder.java" pinned="false" current="false" current-in-tab="false">
+      <file leaf-file-name="ContainerBuilder.java" pinned="false" current="true" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/src/com/google/inject/ContainerBuilder.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state line="907" column="0" selection-start="25259" selection-end="25259" vertical-scroll-proportion="24.061588">
-              <folding>
-                <element signature="method#call#0;class#26208:26447" expanded="false" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="SourceProvider.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/com/google/inject/spi/SourceProvider.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
+            <state line="327" column="48" selection-start="10085" selection-end="10085" vertical-scroll-proportion="0.5912162">
               <folding />
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="DefaultSourceProvider.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/com/google/inject/spi/DefaultSourceProvider.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="62" column="0" selection-start="2005" selection-end="2005" vertical-scroll-proportion="1.5316045">
-              <folding>
-                <element signature="imports" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="SourceConsumer.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/com/google/inject/spi/SourceConsumer.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="28" column="24" selection-start="855" selection-end="855" vertical-scroll-proportion="0.5948136">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="Message.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/com/google/inject/spi/Message.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="14" column="3" selection-start="0" selection-end="595" vertical-scroll-proportion="0.38573745">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="ContainerCreationException.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/com/google/inject/ContainerCreationException.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="37" column="18" selection-start="1151" selection-end="1151" vertical-scroll-proportion="0.52512157">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="InterceptorStackCallback.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/com/google/inject/intercept/InterceptorStackCallback.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="14" column="3" selection-start="595" selection-end="595" vertical-scroll-proportion="0.38573745">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="Joinpoint.class" pinned="false" current="false" current-in-tab="false">
-        <entry file="jar://$PROJECT_DIR$/lib/aopalliance.jar!/org/aopalliance/intercept/Joinpoint.class">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="11" column="37" selection-start="313" selection-end="313" vertical-scroll-proportion="0.27552673">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="ProxyFactoryBuilder.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/com/google/inject/intercept/ProxyFactoryBuilder.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="14" column="3" selection-start="595" selection-end="595" vertical-scroll-proportion="0.0">
-              <folding>
-                <element signature="imports" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="Query.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/com/google/inject/intercept/Query.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="23" column="17" selection-start="764" selection-end="764" vertical-scroll-proportion="0.24797407">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="QueryTest.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/test/com/google/inject/intercept/QueryTest.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="20" column="0" selection-start="689" selection-end="689" vertical-scroll-proportion="0.16531605">
-              <folding>
-                <element signature="imports" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="MethodAspect.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/com/google/inject/intercept/MethodAspect.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="14" column="3" selection-start="595" selection-end="595" vertical-scroll-proportion="0.38573745">
-              <folding>
-                <element signature="imports" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="ProxyFactoryTest.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/test/com/google/inject/intercept/ProxyFactoryTest.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="34" column="20" selection-start="1115" selection-end="1115" vertical-scroll-proportion="0.55105346">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="ProxyFactory.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/com/google/inject/intercept/ProxyFactory.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="49" column="41" selection-start="1646" selection-end="1646" vertical-scroll-proportion="0.36628848">
-              <folding>
-                <element signature="imports" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="Queries.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/com/google/inject/intercept/Queries.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="34" column="18" selection-start="1040" selection-end="1040" vertical-scroll-proportion="0.46839547">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="Container.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/com/google/inject/Container.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="100" column="23" selection-start="2670" selection-end="2670" vertical-scroll-proportion="1.4764992">
-              <folding>
-                <element signature="imports" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="ContainerImpl.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/com/google/inject/ContainerImpl.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="0" column="0" selection-start="0" selection-end="595" vertical-scroll-proportion="0.0">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="guice.iws" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/guice.iws">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="965" column="45" selection-start="47825" selection-end="47825" vertical-scroll-proportion="0.3936877">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="ErrorHandler.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/com/google/inject/ErrorHandler.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="33" column="0" selection-start="841" selection-end="841" vertical-scroll-proportion="0.5235008">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="AbstractErrorHandler.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/com/google/inject/AbstractErrorHandler.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="32" column="0" selection-start="1032" selection-end="1032" vertical-scroll-proportion="0.38573745">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="ErrorMessages.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/com/google/inject/ErrorMessages.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="42" column="25" selection-start="1437" selection-end="1437" vertical-scroll-proportion="0.7714749">
-              <folding>
-                <element signature="imports" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="ConstructionProxy.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/com/google/inject/spi/ConstructionProxy.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="26" column="17" selection-start="837" selection-end="837" vertical-scroll-proportion="0.3306321">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="ConstructionProxyFactory.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/com/google/inject/spi/ConstructionProxyFactory.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="25" column="17" selection-start="785" selection-end="785" vertical-scroll-proportion="0.30307943">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="DefaultConstructionProxyFactory.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/com/google/inject/spi/DefaultConstructionProxyFactory.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="46" column="0" selection-start="1116" selection-end="1602" vertical-scroll-proportion="0.88168555">
-              <folding>
-                <element signature="imports" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
     </leaf>
   </component>
   <component name="FindManager">
@@ -678,7 +432,7 @@
       <showLibraryContents PackagesPane="false" />
       <hideEmptyPackages />
       <abbreviatePackageNames />
-      <showStructure Scope="false" ProjectPane="false" PackagesPane="false" Favorites="false" />
+      <showStructure Favorites="false" ProjectPane="false" Scope="false" PackagesPane="false" />
       <autoscrollToSource />
       <autoscrollFromSource />
       <sortByType />
@@ -738,13 +492,13 @@
   </component>
   <component name="RestoreUpdateTree" />
   <component name="RunManager" selected="Application.ErrorHandlingTest">
-    <tempConfiguration default="false" name="ProxyFactoryTest" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
+    <tempConfiguration default="false" name="QueryTest" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
       <pattern value="com.google.inject.intercept.*" />
       <module name="guice" />
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
       <option name="ALTERNATIVE_JRE_PATH" />
       <option name="PACKAGE_NAME" value="com.google.inject.intercept" />
-      <option name="MAIN_CLASS_NAME" value="com.google.inject.intercept.ProxyFactoryTest" />
+      <option name="MAIN_CLASS_NAME" value="com.google.inject.intercept.QueryTest" />
       <option name="METHOD_NAME" />
       <option name="TEST_OBJECT" value="class" />
       <option name="VM_PARAMETERS" />
@@ -760,13 +514,6 @@
         <option name="Make" value="true" />
       </method>
     </tempConfiguration>
-    <configuration default="true" type="Remote" factoryName="Remote">
-      <option name="USE_SOCKET_TRANSPORT" value="true" />
-      <option name="SERVER_MODE" value="false" />
-      <option name="SHMEM_ADDRESS" value="javadebug" />
-      <option name="HOST" value="localhost" />
-      <option name="PORT" value="5005" />
-    </configuration>
     <configuration default="true" type="Applet" factoryName="Applet">
       <module name="" />
       <option name="MAIN_CLASS_NAME" />
@@ -792,6 +539,13 @@
         <option name="Make" value="true" />
       </method>
     </configuration>
+    <configuration default="true" type="Remote" factoryName="Remote">
+      <option name="USE_SOCKET_TRANSPORT" value="true" />
+      <option name="SERVER_MODE" value="false" />
+      <option name="SHMEM_ADDRESS" value="javadebug" />
+      <option name="HOST" value="localhost" />
+      <option name="PORT" value="5005" />
+    </configuration>
     <configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
       <module name="" />
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
@@ -934,7 +688,7 @@
     <option name="UPDATE_RUN_STATUS" value="false" />
     <option name="UPDATE_RECURSIVELY" value="true" />
     <option name="MERGE_DRY_RUN" value="false" />
-    <configuration useDefault="true">/home/crazybob/.subversion</configuration>
+    <configuration useDefault="true">/Users/crazybob/.subversion</configuration>
     <remoteStatus />
     <upgradeMode>auto</upgradeMode>
   </component>
@@ -953,38 +707,38 @@
     </todo-panel>
   </component>
   <component name="ToolWindowManager">
-    <frame x="4" y="44" width="1916" height="1156" extended-state="0" />
+    <frame x="4" y="22" width="1916" height="1178" extended-state="6" />
     <editor active="true" />
     <layout>
       <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
       <window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
       <window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3336904" order="3" />
-      <window_info id="Mach" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32919848" order="9" />
       <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" />
       <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.15854311" order="0" />
-      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.29517502" order="1" />
+      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.29509714" order="1" />
       <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.16236559" order="1" />
-      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.47492903" order="10" />
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4745606" order="10" />
       <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="6" />
-      <window_info id="Profile" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32890996" order="13" />
       <window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
       <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="11" />
       <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
       <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.14623655" order="1" />
       <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3282876" order="8" />
-      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.40018922" order="2" />
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.39962998" order="2" />
       <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" />
       <window_info id="File View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="6" />
-      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39978448" order="0" />
       <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32639545" order="4" />
+      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39978448" order="0" />
       <window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
       <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.34531695" order="12" />
+      <window_info id="Mach" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32919848" order="9" />
       <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="0" />
       <window_info id="Favorites" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="4" />
       <window_info id="Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="5" />
       <window_info id="Compare Directories" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32977018" order="3" />
       <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" />
       <window_info id="EJB" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="3" />
+      <window_info id="Profile" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32890996" order="13" />
       <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="5" />
     </layout>
   </component>
@@ -1071,119 +825,107 @@
     <option name="myLastEditedConfigurable" value="Default" />
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/test/com/google/inject/intercept/IntegrationTest.java">
+    <entry file="file://$PROJECT_DIR$/src/com/google/inject/ErrorHandler.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="15" column="0" selection-start="596" selection-end="596" vertical-scroll-proportion="0.4132901">
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/google/inject/intercept/InterceptorStackCallback.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="14" column="3" selection-start="595" selection-end="595" vertical-scroll-proportion="0.38573745">
+        <state line="33" column="0" selection-start="841" selection-end="841" vertical-scroll-proportion="0.5456081">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/test/com/google/inject/intercept/QueryTest.java">
+    <entry file="file://$PROJECT_DIR$/guice.iws">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="20" column="0" selection-start="689" selection-end="689" vertical-scroll-proportion="0.16531605">
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
+        <state line="907" column="11" selection-start="47825" selection-end="47825" vertical-scroll-proportion="0.029462738">
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/google/inject/intercept/MethodAspect.java">
+    <entry file="file://$PROJECT_DIR$/src/com/google/inject/ContainerImpl.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="14" column="3" selection-start="595" selection-end="595" vertical-scroll-proportion="0.38573745">
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
+        <state line="0" column="0" selection-start="0" selection-end="595" vertical-scroll-proportion="0.0">
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/test/com/google/inject/intercept/ProxyFactoryTest.java">
+    <entry file="file://$PROJECT_DIR$/src/com/google/inject/Container.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="34" column="20" selection-start="1115" selection-end="1115" vertical-scroll-proportion="0.55105346">
+        <state line="100" column="23" selection-start="2670" selection-end="2670" vertical-scroll-proportion="1.5557432">
           <folding />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/test/com/google/inject/AllTests.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="43" column="38" selection-start="1526" selection-end="1526" vertical-scroll-proportion="0.55105346">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/google/inject/intercept/ProxyFactory.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="49" column="41" selection-start="1646" selection-end="1646" vertical-scroll-proportion="0.36628848">
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/google/inject/ContainerCreationException.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="37" column="18" selection-start="1151" selection-end="1151" vertical-scroll-proportion="0.52512157">
+        <state line="32" column="13" selection-start="1115" selection-end="1115" vertical-scroll-proportion="0.25844595">
           <folding />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/src/com/google/inject/intercept/Queries.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="34" column="18" selection-start="1040" selection-end="1040" vertical-scroll-proportion="0.46839547">
+        <state line="29" column="13" selection-start="922" selection-end="922" vertical-scroll-proportion="0.3158784">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/google/inject/spi/Message.java">
+    <entry file="file://$PROJECT_DIR$/src/com/google/inject/intercept/ProxyFactory.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="14" column="3" selection-start="0" selection-end="595" vertical-scroll-proportion="0.38573745">
+        <state line="47" column="0" selection-start="1540" selection-end="1540" vertical-scroll-proportion="0.3445946">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/google/inject/spi/DefaultSourceProvider.java">
+    <entry file="file://$PROJECT_DIR$/test/com/google/inject/intercept/ProxyFactoryTest.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="62" column="0" selection-start="2005" selection-end="2005" vertical-scroll-proportion="1.5316045">
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/google/inject/spi/SourceProvider.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
+        <state line="34" column="20" selection-start="1115" selection-end="1115" vertical-scroll-proportion="0.028716216">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/google/inject/ContainerBuilder.java">
+    <entry file="file://$PROJECT_DIR$/src/com/google/inject/intercept/MethodAspect.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="907" column="0" selection-start="25259" selection-end="25259" vertical-scroll-proportion="24.061588">
-          <folding>
-            <element signature="method#call#0;class#26208:26447" expanded="false" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/google/inject/spi/SourceConsumer.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="28" column="24" selection-start="855" selection-end="855" vertical-scroll-proportion="0.5948136">
+        <state line="14" column="3" selection-start="595" selection-end="595" vertical-scroll-proportion="0.0">
           <folding />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/test/com/google/inject/ErrorHandlingTest.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="40" column="0" selection-start="1039" selection-end="1039" vertical-scroll-proportion="0.7163695">
+        <state line="58" column="0" selection-start="1471" selection-end="1471" vertical-scroll-proportion="0.5405405">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/test/com/google/inject/intercept/QueryTest.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="79" column="45" selection-start="2432" selection-end="2432" vertical-scroll-proportion="1.6942568">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/com/google/inject/intercept/Query.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="23" column="17" selection-start="764" selection-end="764" vertical-scroll-proportion="0.25844595">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/com/google/inject/intercept/ProxyFactoryBuilder.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="14" column="3" selection-start="595" selection-end="595" vertical-scroll-proportion="0.0">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/com/google/inject/spi/DefaultConstructionProxyFactory.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="33" column="0" selection-start="1115" selection-end="1115" vertical-scroll-proportion="0.43074325">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/com/google/inject/ContainerBuilder.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="327" column="48" selection-start="10085" selection-end="10085" vertical-scroll-proportion="0.5912162">
           <folding />
         </state>
       </provider>
diff --git a/src/com/google/inject/ContainerBuilder.java b/src/com/google/inject/ContainerBuilder.java
index f1db3f4..7b8f0ab 100644
--- a/src/com/google/inject/ContainerBuilder.java
+++ b/src/com/google/inject/ContainerBuilder.java
@@ -314,9 +314,11 @@
     createBindings(preload, preloaders);
     createLinkedBindings();
 
+    stopwatch.resetAndLog(logger, "Binding creation");
+
     container.index();
 
-    stopwatch.resetAndLog(logger, "Binding creation");
+    stopwatch.resetAndLog(logger, "Binding indexing");
 
     // Run validations.
     for (Validation validation : validations) {
diff --git a/src/com/google/inject/ErrorMessages.java b/src/com/google/inject/ErrorMessages.java
index b670bea..15516bd 100644
--- a/src/com/google/inject/ErrorMessages.java
+++ b/src/com/google/inject/ErrorMessages.java
@@ -31,8 +31,8 @@
           + " type were found.";
 
   private static final String MISSING_BINDING_BUT_OTHERS_EXIST =
-      "Binding to %s not found, but %s requires it. The names of other"
-          + " bindings to that type include: %s";
+      "Binding to %s not found, but %s requires it. Names of other"
+          + " bindings to that type: %s";
 
   static void handleMissingBinding(ErrorHandler errorHandler, Member member,
       Key<?> key, List<String> otherNames) {
diff --git a/src/com/google/inject/intercept/Queries.java b/src/com/google/inject/intercept/Queries.java
index bd7f761..308dcff 100644
--- a/src/com/google/inject/intercept/Queries.java
+++ b/src/com/google/inject/intercept/Queries.java
@@ -20,6 +20,7 @@
 
 import java.lang.annotation.Annotation;
 import java.lang.reflect.AnnotatedElement;
+import java.lang.reflect.Method;
 
 /**
  * Query implementations. Supports querying classes and methods.
@@ -30,17 +31,21 @@
 
   private Queries() {}
 
-  static Query<Object> ALL = new AbstractQuery<Object>() {
+  static Query<Object> ANY = new AbstractQuery<Object>() {
     public boolean matches(Object o) {
       return true;
     }
+
+    public String toString() {
+      return "any()";
+    }
   };
 
   /**
    * Returns a query which matches any input.
    */
-  public static Query<Object> all() {
-    return ALL;
+  public static Query<Object> any() {
+    return ANY;
   }
 
   /**
@@ -52,6 +57,10 @@
       public boolean matches(T t) {
         return !p.matches(t);
       }
+
+      public String toString() {
+        return "not(" + p + ")";
+      }
     };
   }
 
@@ -67,11 +76,16 @@
         Annotation annotation = element.getAnnotation(annotationType);
         return annotation != null;
       }
+
+      public String toString() {
+        return "annotatedWith(" + annotationType.getSimpleName() + ".class)";
+      }
     };
   }
 
   /**
-   * Returns a query which matches subclasses of the given type.
+   * Returns a query which matches subclasses of the given type (as well as
+   * the given type).
    */
   public static Query<Class> subclassesOf(final Class<?> superclass) {
     Objects.nonNull(superclass, "superclass");
@@ -79,6 +93,10 @@
       public boolean matches(Class subclass) {
         return superclass.isAssignableFrom(subclass);
       }
+
+      public String toString() {
+        return "subclassesOf(" + superclass.getSimpleName() + ".class)";
+      }
     };
   }
 
@@ -91,6 +109,10 @@
       public boolean matches(Object other) {
         return o.equals(other);
       }
+
+      public String toString() {
+        return "only(" + o + ")";
+      }
     };
   }
 
@@ -103,6 +125,10 @@
       public boolean matches(Object other) {
         return o == other;
       }
+
+      public String toString() {
+        return "identicalTo(" + o + ")";
+      }
     };
   }
 
@@ -115,21 +141,27 @@
       public boolean matches(Class c) {
         return c.getPackage().equals(p);
       }
+
+      public String toString() {
+        return "package(" + p.getName() + ")";
+      }
     };
   }
 
-// Can't get the types to work.
-//
-//  /**
-//   * Returns a predicate which matches methods with matching return types.
-//   */
-//  public static Query<Method> returns(
-//      final Query<? super Class<?>> returnType) {
-//    Objects.nonNull(returnType, "return type query");
-//    return new AbstractQuery<Method>() {
-//      public boolean matches(Method m) {
-//        return returnType.matches(m.getReturnType());
-//      }
-//    };
-//  }
+  /**
+   * Returns a predicate which matches methods with matching return types.
+   */
+  public static Query<Method> returns(
+      final Query<? super Class<?>> returnType) {
+    Objects.nonNull(returnType, "return type query");
+    return new AbstractQuery<Method>() {
+      public boolean matches(Method m) {
+        return returnType.matches(m.getReturnType());
+      }
+
+      public String toString() {
+        return "returns(" + returnType + ")";
+      }
+    };
+  }
 }
diff --git a/src/com/google/inject/spi/DefaultSourceProvider.java b/src/com/google/inject/spi/DefaultSourceProvider.java
index a39479d..72f2551 100644
--- a/src/com/google/inject/spi/DefaultSourceProvider.java
+++ b/src/com/google/inject/spi/DefaultSourceProvider.java
@@ -34,7 +34,8 @@
   final Set<String> skippedClassNames = new HashSet<String>(Arrays.asList(
       ContainerBuilder.class.getName(),
       AbstractModule.class.getName(),
-      DefaultSourceProvider.class.getName()
+      DefaultSourceProvider.class.getName(),
+      SourceConsumer.class.getName()
   ));
 
   /**
@@ -45,7 +46,7 @@
    *
    * <p>Skipping only takes place after this method is called.
    */
-  public void skipSource(Class<?> clazz) {
+  public void skip(Class<?> clazz) {
     skippedClassNames.add(clazz.getName());
   }
 
diff --git a/test/com/google/inject/ErrorHandlingTest.java b/test/com/google/inject/ErrorHandlingTest.java
index cc87b6d..402bd0a 100644
--- a/test/com/google/inject/ErrorHandlingTest.java
+++ b/test/com/google/inject/ErrorHandlingTest.java
@@ -23,6 +23,12 @@
  */
 public class ErrorHandlingTest {
 
+  public static void main(String[] args) throws ContainerCreationException {
+    ContainerBuilder builder = new ContainerBuilder();
+    builder.apply(new MyModule());
+    builder.create(true);
+  }
+
   @Inject("missing")
   static List<String> missing;
 
@@ -59,10 +65,4 @@
       requestStaticInjection(ErrorHandlingTest.class);
     }
   }
-
-  public static void main(String[] args) throws ContainerCreationException {
-    ContainerBuilder builder = new ContainerBuilder();
-    builder.apply(new MyModule());
-    builder.create(true);
-  }
 }
diff --git a/test/com/google/inject/intercept/IntegrationTest.java b/test/com/google/inject/intercept/IntegrationTest.java
index 8009246..4f24e87 100644
--- a/test/com/google/inject/intercept/IntegrationTest.java
+++ b/test/com/google/inject/intercept/IntegrationTest.java
@@ -35,7 +35,7 @@
   public void testIntegration() throws ContainerCreationException {
     CountingInterceptor counter = new CountingInterceptor();
     ProxyFactoryBuilder proxyFactoryBuilder = new ProxyFactoryBuilder();
-    proxyFactoryBuilder.intercept(all(), all(), counter);
+    proxyFactoryBuilder.intercept(any(), any(), counter);
     ProxyFactory proxyFactory = proxyFactoryBuilder.create();
 
     ContainerBuilder containerBuilder = new ContainerBuilder(proxyFactory);
diff --git a/test/com/google/inject/intercept/ProxyFactoryTest.java b/test/com/google/inject/intercept/ProxyFactoryTest.java
index 7b8fa41..ca64b01 100644
--- a/test/com/google/inject/intercept/ProxyFactoryTest.java
+++ b/test/com/google/inject/intercept/ProxyFactoryTest.java
@@ -39,7 +39,7 @@
     SimpleInterceptor interceptor = new SimpleInterceptor();
 
     ProxyFactoryBuilder builder = new ProxyFactoryBuilder();
-    builder.intercept(all(), all(), interceptor);
+    builder.intercept(any(), any(), interceptor);
     ProxyFactory factory = builder.create();
 
     Factory<Simple> creator = factory.getFactory(Simple.class);
@@ -129,7 +129,7 @@
     SimpleInterceptor interceptor = new SimpleInterceptor();
 
     ProxyFactoryBuilder builder = new ProxyFactoryBuilder();
-    builder.intercept(all(), all(), interceptor);
+    builder.intercept(any(), any(), interceptor);
     ProxyFactory factory = builder.create();
 
     ConstructionProxy<A> constructor =
@@ -145,7 +145,7 @@
     SimpleInterceptor interceptor = new SimpleInterceptor();
 
     ProxyFactoryBuilder builder = new ProxyFactoryBuilder();
-    builder.intercept(not(all()), not(all()), interceptor);
+    builder.intercept(not(any()), not(any()), interceptor);
     ProxyFactory factory = builder.create();
 
     ConstructionProxy<A> constructor =
@@ -169,7 +169,7 @@
     CountingInterceptor countingInterceptor = new CountingInterceptor();
 
     ProxyFactoryBuilder builder = new ProxyFactoryBuilder();
-    builder.intercept(all(), all(), doubleInterceptor, countingInterceptor);
+    builder.intercept(any(), any(), doubleInterceptor, countingInterceptor);
     ProxyFactory factory = builder.create();
 
     ConstructionProxy<Counter> constructor =
diff --git a/test/com/google/inject/intercept/QueryTest.java b/test/com/google/inject/intercept/QueryTest.java
index 148ce97..2a91d97 100644
--- a/test/com/google/inject/intercept/QueryTest.java
+++ b/test/com/google/inject/intercept/QueryTest.java
@@ -22,6 +22,7 @@
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
+import java.lang.reflect.Method;
 
 /**
  * @author crazybob@google.com (Bob Lee)
@@ -29,16 +30,16 @@
 public class QueryTest extends TestCase {
 
   public void testAny() {
-    assertTrue(all().matches(null));
+    assertTrue(any().matches(null));
   }
 
   public void testNot() {
-    assertFalse(not(all()).matches(null));
+    assertFalse(not(any()).matches(null));
   }
 
   public void testAnd() {
-    assertTrue(all().and(all()).matches(null));
-    assertFalse(all().and(not(all())).matches(null));
+    assertTrue(any().and(any()).matches(null));
+    assertFalse(any().and(not(any())).matches(null));
   }
 
   public void testAnnotatedWith() {
@@ -71,12 +72,13 @@
         .matches(Object.class));
   }
 
-//  public void testReturns() throws NoSuchMethodException {
-//    Predicate<Class<String>> returnTypePredicate = sameAs(String.class);
-//    Predicate<Method> predicate = returns(returnTypePredicate);
-//    assertTrue(predicate.matches(
-//        Object.class.getMethod("toString")));
-//  }
+  public void testReturns() throws NoSuchMethodException {
+    Query<Method> predicate = returns(only(String.class));
+    assertTrue(predicate.matches(
+        Object.class.getMethod("toString")));
+    assertFalse(predicate.matches(
+        Object.class.getMethod("hashCode")));
+  }
   
   static abstract class MyRunnable implements Runnable {}