Added overloaded methods which accept a name to Container. Re-implemented the built-in scopes as an enum. Added ContainerBuilder.scope(Enum). Added support for custom scope annotations.
git-svn-id: https://google-guice.googlecode.com/svn/trunk@95 d779f126-a31b-0410-b53b-1d3aecad763e
diff --git a/guice.iws b/guice.iws
deleted file mode 100644
index e1e2649..0000000
--- a/guice.iws
+++ /dev/null
@@ -1,1003 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4" relativePaths="false">
- <component name="AspectsView" />
- <component name="BookmarkManager" />
- <component name="ChangeBrowserSettings">
- <option name="MAIN_SPLITTER_PROPORTION" value="0.3" />
- <option name="MESSAGES_SPLITTER_PROPORTION" value="0.8" />
- <option name="USE_DATE_BEFORE_FILTER" value="false" />
- <option name="USE_DATE_AFTER_FILTER" value="false" />
- <option name="USE_CHANGE_BEFORE_FILTER" value="false" />
- <option name="USE_CHANGE_AFTER_FILTER" value="false" />
- <option name="DATE_BEFORE" />
- <option name="DATE_AFTER" />
- <option name="CHANGE_BEFORE" value="" />
- <option name="CHANGE_AFTER" value="" />
- <option name="USE_USER_FILTER" value="false" />
- <option name="USER" value="" />
- </component>
- <component name="ChangeListManager">
- <list default="true" name="Default" comment="">
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/google/inject/AbstractModule.java" afterPath="$PROJECT_DIR$/src/com/google/inject/AbstractModule.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/guice.iws" afterPath="$PROJECT_DIR$/guice.iws" />
- <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$/test/com/google/inject/ErrorHandlingTest.java" afterPath="$PROJECT_DIR$/test/com/google/inject/ErrorHandlingTest.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/test/com/google/inject/ContainerTest.java" afterPath="$PROJECT_DIR$/test/com/google/inject/ContainerTest.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/test/com/google/inject/PerformanceComparison.java" afterPath="$PROJECT_DIR$/test/com/google/inject/PerformanceComparison.java" />
- </list>
- </component>
- <component name="ChangeListSynchronizer" />
- <component name="ChangesViewManager" flattened_view="true" />
- <component name="CheckinPanelState" />
- <component name="Commander">
- <leftPanel />
- <rightPanel />
- <splitter proportion="0.5" />
- </component>
- <component name="Compare Directories">
- <option name="identicalVisible" value="true" />
- <option name="differentVisible" value="true" />
- <option name="differentInBlanksVisible" value="true" />
- <option name="leftOnlyVisible" value="true" />
- <option name="rightOnlyVisible" value="true" />
- <option name="javaStructureVisible" value="false" />
- <option name="lastLeftPaths">
- <value len="1" s0="$PROJECT_DIR$/src/com/google/inject" />
- </option>
- <option name="lastRightPaths">
- <value len="1" s0="$PROJECT_DIR$/test/com/google/inject" />
- </option>
- <option name="exportFileName" value="CompareDirectories.txt" />
- </component>
- <component name="CompilerWorkspaceConfiguration">
- <option name="COMPILE_IN_BACKGROUND" value="true" />
- <option name="AUTO_SHOW_ERRORS_IN_EDITOR" value="true" />
- <option name="CLOSE_MESSAGE_VIEW_IF_SUCCESS" value="false" />
- <option name="COMPILE_DEPENDENT_FILES" value="false" />
- <option name="CLEAR_OUTPUT_DIRECTORY" value="true" />
- <option name="ASSERT_NOT_NULL" value="true" />
- </component>
- <component name="CoverageDataManager" />
- <component name="Cvs2Configuration">
- <option name="PRUNE_EMPTY_DIRECTORIES" value="true" />
- <option name="MERGING_MODE" value="0" />
- <option name="MERGE_WITH_BRANCH1_NAME" value="HEAD" />
- <option name="MERGE_WITH_BRANCH2_NAME" value="HEAD" />
- <option name="RESET_STICKY" value="false" />
- <option name="CREATE_NEW_DIRECTORIES" value="true" />
- <option name="DEFAULT_TEXT_FILE_SUBSTITUTION" value="kv" />
- <option name="PROCESS_UNKNOWN_FILES" value="false" />
- <option name="PROCESS_DELETED_FILES" value="false" />
- <option name="PROCESS_IGNORED_FILES" value="false" />
- <option name="RESERVED_EDIT" value="false" />
- <option name="CHECKOUT_DATE_OR_REVISION_SETTINGS">
- <value>
- <option name="BRANCH" value="" />
- <option name="DATE" value="" />
- <option name="USE_BRANCH" value="false" />
- <option name="USE_DATE" value="false" />
- </value>
- </option>
- <option name="UPDATE_DATE_OR_REVISION_SETTINGS">
- <value>
- <option name="BRANCH" value="" />
- <option name="DATE" value="" />
- <option name="USE_BRANCH" value="false" />
- <option name="USE_DATE" value="false" />
- </value>
- </option>
- <option name="SHOW_CHANGES_REVISION_SETTINGS">
- <value>
- <option name="BRANCH" value="" />
- <option name="DATE" value="" />
- <option name="USE_BRANCH" value="false" />
- <option name="USE_DATE" value="false" />
- </value>
- </option>
- <option name="SHOW_OUTPUT" value="false" />
- <option name="ADD_WATCH_INDEX" value="0" />
- <option name="REMOVE_WATCH_INDEX" value="0" />
- <option name="UPDATE_KEYWORD_SUBSTITUTION" />
- <option name="MAKE_NEW_FILES_READONLY" value="false" />
- <option name="SHOW_CORRUPTED_PROJECT_FILES" value="0" />
- <option name="TAG_AFTER_PROJECT_COMMIT" value="false" />
- <option name="OVERRIDE_EXISTING_TAG_FOR_PROJECT" value="true" />
- <option name="TAG_AFTER_PROJECT_COMMIT_NAME" value="" />
- <option name="CLEAN_COPY" value="false" />
- </component>
- <component name="DaemonCodeAnalyzer">
- <disable_hints />
- </component>
- <component name="DebuggerManager">
- <breakpoint_any>
- <breakpoint>
- <option name="NOTIFY_CAUGHT" value="true" />
- <option name="NOTIFY_UNCAUGHT" value="true" />
- <option name="ENABLED" value="false" />
- <option name="SUSPEND_POLICY" value="SuspendAll" />
- <option name="LOG_ENABLED" value="false" />
- <option name="LOG_EXPRESSION_ENABLED" value="false" />
- <option name="COUNT_FILTER_ENABLED" value="false" />
- <option name="COUNT_FILTER" value="0" />
- <option name="CONDITION_ENABLED" value="false" />
- <option name="CLASS_FILTERS_ENABLED" value="false" />
- <option name="INSTANCE_FILTERS_ENABLED" value="false" />
- <option name="CONDITION" value="" />
- <option name="LOG_MESSAGE" value="" />
- </breakpoint>
- <breakpoint>
- <option name="NOTIFY_CAUGHT" value="true" />
- <option name="NOTIFY_UNCAUGHT" value="true" />
- <option name="ENABLED" value="false" />
- <option name="SUSPEND_POLICY" value="SuspendAll" />
- <option name="LOG_ENABLED" value="false" />
- <option name="LOG_EXPRESSION_ENABLED" value="false" />
- <option name="COUNT_FILTER_ENABLED" value="false" />
- <option name="COUNT_FILTER" value="0" />
- <option name="CONDITION_ENABLED" value="false" />
- <option name="CLASS_FILTERS_ENABLED" value="false" />
- <option name="INSTANCE_FILTERS_ENABLED" value="false" />
- <option name="CONDITION" value="" />
- <option name="LOG_MESSAGE" value="" />
- </breakpoint>
- </breakpoint_any>
- <breakpoint_rules />
- <ui_properties>
- <property name="exception_breakpoints_flattenPackages" value="true" />
- <property name="line_breakpoints_groupByClasses" value="true" />
- <property name="exception_breakpoints_groupByMethods" value="false" />
- <property name="method_breakpoints_viewId" value="TABLE" />
- <property name="line_breakpoints_viewId" value="TABLE" />
- <property name="exception_breakpoints_groupByClasses" value="true" />
- <property name="method_breakpoints_groupByMethods" value="false" />
- <property name="field_breakpoints_flattenPackages" value="true" />
- <property name="line_breakpoints_flattenPackages" value="true" />
- <property name="exception_breakpoints_viewId" value="TABLE" />
- <property name="field_breakpoints_groupByClasses" value="true" />
- <property name="method_breakpoints_flattenPackages" value="true" />
- <property name="field_breakpoints_viewId" value="TABLE" />
- <property name="line_breakpoints_groupByMethods" value="false" />
- <property name="method_breakpoints_groupByClasses" value="true" />
- <property name="field_breakpoints_groupByMethods" value="false" />
- </ui_properties>
- </component>
- <component name="ErrorTreeViewConfiguration">
- <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
- <option name="HIDE_WARNINGS" value="false" />
- </component>
- <component name="FavoritesManager">
- <favorites_list name="guice" />
- </component>
- <component name="FavoritesProjectViewPane">
- <subPane subId="guice">
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" />
- <option name="myItemType" value="com.intellij.ide.favoritesTreeView.FavoritesTreeNodeDescriptor" />
- </PATH_ELEMENT>
- </PATH>
- </subPane>
- </component>
- <component name="FavoritesViewImpl">
- <favorites_list name="guice">
- <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
- <option name="IS_SHOW_MEMBERS" value="false" />
- <option name="IS_STRUCTURE_VIEW" value="false" />
- <option name="IS_SHOW_MODULES" value="true" />
- <option name="IS_FLATTEN_PACKAGES" value="false" />
- <option name="IS_ABBREVIATION_PACKAGE_NAMES" value="false" />
- <option name="IS_HIDE_EMPTY_MIDDLE_PACKAGES" value="false" />
- <option name="IS_SHOW_LIBRARY_CONTENTS" value="true" />
- </favorites_list>
- <option name="myCurrentFavoritesList" value="guice" />
- </component>
- <component name="FileEditorManager">
- <leaf>
- <file leaf-file-name="ContainerBuilder.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/src/com/google/inject/ContainerBuilder.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="263" column="17" selection-start="7957" selection-end="7957" vertical-scroll-proportion="0.33333334">
- <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="595" column="0" selection-start="18754" selection-end="18754" vertical-scroll-proportion="0.016236868">
- <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="41" column="6" selection-start="1346" selection-end="1346" vertical-scroll-proportion="0.016236868">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="PerformanceComparison.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/test/com/google/inject/PerformanceComparison.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="47" column="0" selection-start="1758" selection-end="1758" vertical-scroll-proportion="0.016236868">
- <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="150" column="5" selection-start="3888" selection-end="3888" vertical-scroll-proportion="0.6513849">
- <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="32" column="13" selection-start="1115" selection-end="1115" vertical-scroll-proportion="0.1461318">
- <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="127" column="0" selection-start="3268" selection-end="3268" vertical-scroll-proportion="0.9274117">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="ContainerTest.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/test/com/google/inject/ContainerTest.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="37" column="25" selection-start="1266" selection-end="1266" vertical-scroll-proportion="0.3409742">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="AbstractModule.java" pinned="false" current="true" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/src/com/google/inject/AbstractModule.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="138" column="18" selection-start="3540" selection-end="3540" vertical-scroll-proportion="0.83763134">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- </leaf>
- </component>
- <component name="FindManager">
- <FindUsagesManager>
- <setting name="OPEN_NEW_TAB" value="false" />
- </FindUsagesManager>
- </component>
- <component name="HierarchyBrowserManager">
- <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
- <option name="SORT_ALPHABETICALLY" value="false" />
- <option name="HIDE_CLASSES_WHERE_METHOD_NOT_IMPLEMENTED" value="false" />
- </component>
- <component name="InspectionManager">
- <option name="AUTOSCROLL_TO_SOURCE" value="false" />
- <option name="SPLITTER_PROPORTION" value="0.5" />
- <option name="GROUP_BY_SEVERITY" value="false" />
- <option name="FILTER_RESOLVED_ITEMS" value="true" />
- <option name="ANALYZE_TEST_SOURCES" value="true" />
- <option name="SHOW_DIFF_WITH_PREVIOUS_RUN" value="false" />
- <option name="SCOPE_TYPE" value="1" />
- <option name="CUSTOM_SCOPE_NAME" value="" />
- <option name="SHOW_ONLY_DIFF" value="false" />
- <option name="myCurrentProfileName" value="Default" />
- </component>
- <component name="J2EEProjectPane" />
- <component name="JspContextManager" />
- <component name="ModuleEditorState">
- <option name="LAST_EDITED_MODULE_NAME" value="guice" />
- <option name="LAST_EDITED_TAB_NAME" value="Paths" />
- </component>
- <component name="NamedScopeManager" />
- <component name="PackagesPane">
- <subPane>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="guice.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="guice.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="com.google.inject.util" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="guice.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="com.google.inject.spi" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="guice.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="com.google.inject.intercept" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="guice.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="com.google.inject" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
- </PATH_ELEMENT>
- </PATH>
- </subPane>
- </component>
- <component name="PerforceChangeBrowserSettings">
- <option name="USE_CLIENT_FILTER" value="true" />
- <option name="CLIENT" value="" />
- </component>
- <component name="PerforceDirect.Settings">
- <option name="useP4CONFIG" value="true" />
- <option name="port" value="<perforce_server>:1666" />
- <option name="client" value="" />
- <option name="user" value="" />
- <option name="passwd" value="" />
- <option name="showCmds" value="false" />
- <option name="useNativeApi" value="false" />
- <option name="pathToExec" value="p4" />
- <option name="useCustomPathToExec" value="false" />
- <option name="SYNC_FORCE" value="false" />
- <option name="SYNC_RUN_RESOLVE" value="true" />
- <option name="REVERT_UNCHANGED_FILES" value="true" />
- <option name="CHARSET" value="none" />
- <option name="SHOW_BRANCHES_HISTORY" value="true" />
- <option name="ENABLED" value="true" />
- <option name="USE_LOGIN" value="false" />
- <option name="LOGIN_SILENTLY" value="false" />
- <option name="INTEGRATE_RUN_RESOLVE" value="true" />
- <option name="INTEGRATE_REVERT_UNCHANGED" value="true" />
- <option name="SERVER_TIMEOUT" value="20000" />
- </component>
- <component name="ProjectLevelVcsManager">
- <OptionsSetting value="true" id="Add" />
- <OptionsSetting value="true" id="Remove" />
- <OptionsSetting value="true" id="Checkin" />
- <OptionsSetting value="true" id="Checkout" />
- <OptionsSetting value="true" id="Update" />
- <OptionsSetting value="true" id="Status" />
- <OptionsSetting value="true" id="Edit" />
- <OptionsSetting value="true" id="Undo Check Out" />
- <OptionsSetting value="true" id="Compare with SourceSafe Version" />
- <OptionsSetting value="true" id="Get Latest Version" />
- <ConfirmationsSetting value="0" id="Add" />
- <ConfirmationsSetting value="0" id="Remove" />
- </component>
- <component name="ProjectPane">
- <subPane>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="guice.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="guice" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="guice.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="guice" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="guice.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="guice" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/com/google/inject" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="guice.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="guice" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/com/google/inject" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/com/google/inject/intercept" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="guice.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="guice" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/lib" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- </subPane>
- </component>
- <component name="ProjectReloadState">
- <option name="STATE" value="1" />
- </component>
- <component name="ProjectView">
- <navigator currentView="PackagesPane" proportions="0.16666667" version="1" splitterProportion="0.5">
- <flattenPackages PackagesPane="true" />
- <showMembers />
- <showModules PackagesPane="false" />
- <showLibraryContents PackagesPane="false" />
- <hideEmptyPackages />
- <abbreviatePackageNames />
- <showStructure Favorites="false" PackagesPane="false" Scope="false" ProjectPane="false" />
- <autoscrollToSource />
- <autoscrollFromSource />
- <sortByType />
- </navigator>
- </component>
- <component name="PropertiesComponent">
- <property name="MemberChooser.copyJavadoc" value="false" />
- <property name="cvs_file_history_treeWidth0" value="457" />
- <property name="cvs_file_history_flatWidth2" value="457" />
- <property name="cvs_file_history_treeOrder1" value="1" />
- <property name="GoToFile.includeJavaFiles" value="false" />
- <property name="cvs_file_history_flatOrder1" value="1" />
- <property name="cvs_file_history_flatWidth1" value="456" />
- <property name="cvs_file_history_treeWidth1" value="456" />
- <property name="GoToClass.includeLibraries" value="false" />
- <property name="cvs_file_history_flatOrder2" value="2" />
- <property name="MemberChooser.showClasses" value="true" />
- <property name="cvs_file_history_treeWidth2" value="457" />
- <property name="GoToClass.toSaveIncludeLibraries" value="false" />
- <property name="cvs_file_history_flatOrder3" value="3" />
- <property name="RunManagerConfig.showSettingsBeforeRunnig" value="false" />
- <property name="MemberChooser.sorted" value="false" />
- <property name="RunManagerConfig.compileBeforeRunning" value="true" />
- <property name="cvs_file_history_flatOrder0" value="0" />
- <property name="cvs_file_history_treeOrder3" value="3" />
- <property name="last_opened_file_path" value="/usr/local/client/2/google3/java/com/google/inject" />
- <property name="cvs_file_history_treeOrder2" value="2" />
- <property name="cvs_file_history_treeWidth3" value="456" />
- <property name="cvs_file_history_flatWidth0" value="457" />
- <property name="cvs_file_history_flatWidth3" value="456" />
- <property name="cvs_file_history_treeOrder0" value="0" />
- </component>
- <component name="ReadonlyStatusHandler">
- <option name="SHOW_DIALOG" value="false" />
- </component>
- <component name="RecentsManager">
- <key name="MoveMembersDialog.RECENTS_KEY">
- <recent name="com.google.inject.ErrorMessages" />
- <recent name="com.google.inject.ConstantConversionException" />
- <recent name="com.google.inject.ContainerBuilder" />
- <recent name="com.google.inject.Key" />
- </key>
- <key name="CopyClassDialog.RECENTS_KEY">
- <recent name="com.google.inject.spi" />
- <recent name="com.google.inject" />
- </key>
- <key name="IntroduceConstantDialog.RECENTS_KEY">
- <recent name="" />
- </key>
- <key name="MoveClassesOrPackagesDialog.RECENTS_KEY">
- <recent name="com.google.inject.spi" />
- <recent name="Message" />
- <recent name="com.google.inject.intercept" />
- <recent name="com.google.inject" />
- <recent name="com.google.inject.util" />
- </key>
- </component>
- <component name="RestoreUpdateTree" />
- <component name="RunManager" selected="JUnit.AllTests">
- <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.QueryTest" />
- <option name="METHOD_NAME" />
- <option name="TEST_OBJECT" value="class" />
- <option name="VM_PARAMETERS" />
- <option name="PARAMETERS" />
- <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
- <option name="ADDITIONAL_CLASS_PATH" />
- <option name="TEST_SEARCH_SCOPE">
- <value defaultName="wholeProject" />
- </option>
- <RunnerSettings RunnerId="Run" />
- <ConfigurationWrapper RunnerId="Run" />
- <method>
- <option name="Make" value="true" />
- </method>
- </tempConfiguration>
- <configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
- <module name="" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
- <option name="PACKAGE_NAME" />
- <option name="MAIN_CLASS_NAME" />
- <option name="METHOD_NAME" />
- <option name="TEST_OBJECT" value="class" />
- <option name="VM_PARAMETERS" />
- <option name="PARAMETERS" />
- <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
- <option name="ADDITIONAL_CLASS_PATH" />
- <option name="TEST_SEARCH_SCOPE">
- <value defaultName="wholeProject" />
- </option>
- <method>
- <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="Application" factoryName="Application" enabled="false" merge="false">
- <option name="MAIN_CLASS_NAME" />
- <option name="VM_PARAMETERS" />
- <option name="PROGRAM_PARAMETERS" />
- <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
- <option name="ENABLE_SWING_INSPECTOR" value="false" />
- <module name="" />
- <method>
- <option name="Make" value="true" />
- </method>
- </configuration>
- <configuration default="true" type="Applet" factoryName="Applet">
- <module name="" />
- <option name="MAIN_CLASS_NAME" />
- <option name="HTML_FILE_NAME" />
- <option name="HTML_USED" value="false" />
- <option name="WIDTH" value="400" />
- <option name="HEIGHT" value="300" />
- <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
- <option name="VM_PARAMETERS" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
- </configuration>
- <configuration default="false" name="PerformanceComparison" type="Application" factoryName="Application" enabled="false" merge="false">
- <option name="MAIN_CLASS_NAME" value="com.google.inject.PerformanceComparison" />
- <option name="VM_PARAMETERS" value="-server" />
- <option name="PROGRAM_PARAMETERS" value="" />
- <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" value="" />
- <option name="ENABLE_SWING_INSPECTOR" value="false" />
- <module name="guice" />
- <RunnerSettings RunnerId="Profile ">
- <option name="myExternalizedOptions" value=" snapshots-dir=/tmp startup=12 " />
- </RunnerSettings>
- <RunnerSettings RunnerId="Run" />
- <ConfigurationWrapper RunnerId="Profile " />
- <ConfigurationWrapper RunnerId="Run" />
- <method>
- <option name="Make" value="true" />
- </method>
- </configuration>
- <configuration default="false" name="ErrorHandlingTest" type="Application" factoryName="Application" enabled="false" merge="false">
- <option name="MAIN_CLASS_NAME" value="com.google.inject.ErrorHandlingTest" />
- <option name="VM_PARAMETERS" />
- <option name="PROGRAM_PARAMETERS" />
- <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
- <option name="ENABLE_SWING_INSPECTOR" value="false" />
- <module name="guice" />
- <RunnerSettings RunnerId="Debug">
- <option name="DEBUG_PORT" value="37148" />
- <option name="TRANSPORT" value="0" />
- <option name="LOCAL" value="true" />
- </RunnerSettings>
- <RunnerSettings RunnerId="Run" />
- <ConfigurationWrapper RunnerId="Debug" />
- <ConfigurationWrapper RunnerId="Run" />
- <method>
- <option name="Make" value="true" />
- </method>
- </configuration>
- <configuration default="false" name="AllTests" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
- <pattern value="com.google.inject.*" />
- <module name="guice" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
- <option name="PACKAGE_NAME" value="com.google.inject" />
- <option name="MAIN_CLASS_NAME" value="com.google.inject.AllTests" />
- <option name="METHOD_NAME" />
- <option name="TEST_OBJECT" value="class" />
- <option name="VM_PARAMETERS" />
- <option name="PARAMETERS" />
- <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
- <option name="ADDITIONAL_CLASS_PATH" />
- <option name="TEST_SEARCH_SCOPE">
- <value defaultName="wholeProject" />
- </option>
- <RunnerSettings RunnerId="Run" />
- <ConfigurationWrapper RunnerId="Run" />
- <method>
- <option name="Make" value="true" />
- </method>
- </configuration>
- </component>
- <component name="ScopeViewComponent">
- <subPane subId="Project">
- <PATH>
- <PATH_ELEMENT USER_OBJECT="Root">
- <option name="myItemId" value="" />
- <option name="myItemType" value="" />
- </PATH_ELEMENT>
- </PATH>
- </subPane>
- </component>
- <component name="SelectInManager" />
- <component name="StarteamConfiguration">
- <option name="SERVER" value="" />
- <option name="PORT" value="49201" />
- <option name="USER" value="" />
- <option name="PASSWORD" value="" />
- <option name="PROJECT" value="" />
- <option name="VIEW" value="" />
- <option name="ALTERNATIVE_WORKING_PATH" value="" />
- <option name="LOCK_ON_CHECKOUT" value="false" />
- <option name="UNLOCK_ON_CHECKIN" value="false" />
- </component>
- <component name="StructuralSearchPlugin">
- <replaceConfiguration name="user defined" text="// Copyright 2006 Google Inc. All Rights Reserved." recursive="false" caseInsensitive="false" reformatAccordingToStyle="false" shortenFQN="true" replacement="/** * Copyright (C) 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. */" history="1" />
- </component>
- <component name="StructureViewFactory">
- <option name="AUTOSCROLL_MODE" value="true" />
- <option name="AUTOSCROLL_FROM_SOURCE" value="false" />
- <option name="ACTIVE_ACTIONS" value="" />
- </component>
- <component name="Struts Assistant">
- <option name="showInputs" value="true" />
- <option name="resources">
- <value>
- <option name="strutsPath" />
- <option name="strutsHelp" />
- </value>
- </option>
- <option name="selectedTaglibs" />
- <option name="selectedTaglibs" />
- <option name="myStrutsValidationEnabled" value="true" />
- <option name="myTilesValidationEnabled" value="true" />
- <option name="myValidatorValidationEnabled" value="true" />
- <option name="myReportErrorsAsWarnings" value="true" />
- </component>
- <component name="SvnChangesBrowserSettings">
- <option name="USE_AUTHOR_FIELD" value="true" />
- <option name="AUTHOR" value="" />
- <option name="LOCATION" value="https://google-guice.googlecode.com/svn/trunk" />
- <option name="USE_PROJECT_SETTINGS" value="true" />
- <option name="USE_ALTERNATE_LOCATION" value="false" />
- </component>
- <component name="SvnConfiguration">
- <option name="USER" value="" />
- <option name="PASSWORD" value="" />
- <option name="PROCESS_UNRESOLVED" value="false" />
- <option name="LAST_MERGED_REVISION" />
- <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>
- <remoteStatus />
- <upgradeMode>auto</upgradeMode>
- </component>
- <component name="TodoView" selected-index="0">
- <todo-panel id="selected-file">
- <are-packages-shown value="false" />
- <are-modules-shown value="false" />
- <flatten-packages value="false" />
- <is-autoscroll-to-source value="true" />
- </todo-panel>
- <todo-panel id="all">
- <are-packages-shown value="true" />
- <are-modules-shown value="false" />
- <flatten-packages value="false" />
- <is-autoscroll-to-source value="true" />
- </todo-panel>
- </component>
- <component name="ToolWindowManager">
- <frame x="4" y="44" width="1916" height="1156" extended-state="0" />
- <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.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="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.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="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="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="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="5" />
- </layout>
- </component>
- <component name="VCS.FileViewConfiguration">
- <option name="SELECTED_STATUSES" value="DEFAULT" />
- <option name="SELECTED_COLUMNS" value="DEFAULT" />
- <option name="SHOW_FILTERS" value="true" />
- <option name="CUSTOMIZE_VIEW" value="true" />
- <option name="SHOW_FILE_HISTORY_AS_TREE" value="true" />
- </component>
- <component name="VcsManagerConfiguration">
- <option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
- <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
- <option name="PERFORM_UPDATE_IN_BACKGROUND" value="false" />
- <option name="PERFORM_COMMIT_IN_BACKGROUND" value="false" />
- <option name="PUT_FOCUS_INTO_COMMENT" value="false" />
- <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
- <option name="LAST_COMMIT_MESSAGE" value="Refactoring binding API. Adding support for generic types." />
- <option name="SAVE_LAST_COMMIT_MESSAGE" value="true" />
- <option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" />
- <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
- <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
- <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
- <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
- <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
- <option name="ERROR_OCCURED" value="false" />
- <option name="ACTIVE_VCS_NAME" value="svn" />
- <option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
- <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
- <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
- <MESSAGE value="Added type conversion for constants. Optimized ReferenceCache. Removed null check from ContainerImpl.getInstance(). Added Container.hasBindingFor() to provide comparable functionality. Made Key public." />
- <MESSAGE value="Refactoring binding API. Adding support for generic types." />
- </component>
- <component name="VssConfiguration">
- <option name="CLIENT_PATH" value="" />
- <option name="SRCSAFEINI_PATH" value="" />
- <option name="USER_NAME" value="" />
- <option name="PWD" value="" />
- <option name="VSS_IS_INITIALIZED" value="true" />
- <CheckoutOptions>
- <option name="COMMENT" value="" />
- <option name="DO_NOT_GET_LATEST_VERSION" value="false" />
- <option name="REPLACE_WRITABLE" value="false" />
- <option name="RECURSIVE" value="false" />
- </CheckoutOptions>
- <CheckinOptions>
- <option name="COMMENT" value="" />
- <option name="KEEP_CHECKED_OUT" value="false" />
- <option name="RECURSIVE" value="false" />
- </CheckinOptions>
- <AddOptions>
- <option name="COMMENT" value="" />
- <option name="STORE_ONLY_LATEST_VERSION" value="false" />
- <option name="CHECK_OUT_IMMEDIATELY" value="false" />
- <option name="FILE_TYPE" value="0" />
- </AddOptions>
- <UndocheckoutOptions>
- <option name="MAKE_WRITABLE" value="false" />
- <option name="REPLACE_LOCAL_COPY" value="0" />
- <option name="RECURSIVE" value="false" />
- </UndocheckoutOptions>
- <GetOptions>
- <option name="REPLACE_WRITABLE" value="0" />
- <option name="MAKE_WRITABLE" value="false" />
- <option name="ANSWER_NEGATIVELY" value="false" />
- <option name="ANSWER_POSITIVELY" value="false" />
- <option name="RECURSIVE" value="false" />
- <option name="VERSION" />
- </GetOptions>
- <VssConfigurableExcludedFilesTag />
- </component>
- <component name="antWorkspaceConfiguration">
- <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
- <option name="FILTER_TARGETS" value="false" />
- </component>
- <component name="com.intellij.ide.util.scopeChooser.ScopeChooserConfigurable" proportions="" version="1">
- <option name="myLastEditedConfigurable" />
- </component>
- <component name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable" proportions="0.16666667" version="1">
- <option name="myPlainMode" value="false" />
- <option name="myLastEditedConfigurable" value="cglib-nodep-2.2_beta1.jar" />
- </component>
- <component name="com.intellij.profile.ui.ErrorOptionsConfigurable" proportions="0.16666667,0.60142857" version="1">
- <option name="myLastEditedConfigurable" value="Default" />
- </component>
- <component name="editorHistoryManager">
- <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.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="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/ContainerImpl.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="595" column="0" selection-start="18754" selection-end="18754" vertical-scroll-proportion="0.016236868">
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/com/google/inject/ErrorMessages.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="41" column="6" selection-start="1346" selection-end="1346" vertical-scroll-proportion="0.016236868">
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/test/com/google/inject/PerformanceComparison.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="47" column="0" selection-start="1758" selection-end="1758" vertical-scroll-proportion="0.016236868">
- <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="150" column="5" selection-start="3888" selection-end="3888" vertical-scroll-proportion="0.6513849">
- <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="32" column="13" selection-start="1115" selection-end="1115" vertical-scroll-proportion="0.1461318">
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/com/google/inject/Container.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="127" column="0" selection-start="3268" selection-end="3268" vertical-scroll-proportion="0.9274117">
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/test/com/google/inject/ContainerTest.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="37" column="25" selection-start="1266" selection-end="1266" vertical-scroll-proportion="0.3409742">
- <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="263" column="17" selection-start="7957" selection-end="7957" vertical-scroll-proportion="0.33333334">
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/com/google/inject/AbstractModule.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="138" column="18" selection-start="3540" selection-end="3540" vertical-scroll-proportion="0.83763134">
- <folding />
- </state>
- </provider>
- </entry>
- </component>
-</project>
-
diff --git a/src/com/google/inject/AbstractModule.java b/src/com/google/inject/AbstractModule.java
index d16ffe0..3d7c22f 100644
--- a/src/com/google/inject/AbstractModule.java
+++ b/src/com/google/inject/AbstractModule.java
@@ -30,7 +30,7 @@
* <pre>
* public class MyModule extends AbstractModule {
* protected void configure() {
- * bind(Foo.class).to(FooImpl.class).in(Scopes.CONTAINER_SCOPE);
+ * bind(Foo.class).to(FooImpl.class).in(Scopes.CONTAINER);
* bind(BarImpl.class);
* link(Bar.class).to(BarImpl.class);
* bind("port").to(8080);
@@ -71,10 +71,10 @@
}
/**
- * @see ContainerBuilder#put(String, Scope)
+ * @see ContainerBuilder#scope(String, Scope)
*/
protected void put(String name, Scope scope) {
- builder.put(name, scope);
+ builder.scope(name, scope);
}
/**
diff --git a/src/com/google/inject/Container.java b/src/com/google/inject/Container.java
index 8036ec5..f7c43ba 100644
--- a/src/com/google/inject/Container.java
+++ b/src/com/google/inject/Container.java
@@ -124,4 +124,24 @@
* Gets an instance from the factory bound to the given key.
*/
<T> T getInstance(Key<T> key);
+
+ /**
+ * Gets an instance from the factory bound to the given type and name.
+ */
+ <T> T getInstance(TypeLiteral<T> type, String name);
+
+ /**
+ * Gets an instance from the factory bound to the given type and name.
+ */
+ <T> T getInstance(Class<T> type, String name);
+
+ /**
+ * Gets the factory bound to the given type and name.
+ */
+ <T> Factory<T> getFactory(Class<T> type, String name);
+
+ /**
+ * Gets the factory bound to the given type and name.
+ */
+ <T> Factory<T> getFactory(TypeLiteral<T> type, String name);
}
diff --git a/src/com/google/inject/ContainerBuilder.java b/src/com/google/inject/ContainerBuilder.java
index a3b31cb..2aebc8d 100644
--- a/src/com/google/inject/ContainerBuilder.java
+++ b/src/com/google/inject/ContainerBuilder.java
@@ -24,8 +24,10 @@
import static com.google.inject.util.Objects.nonNull;
import com.google.inject.util.Stopwatch;
import com.google.inject.util.ToStringBuilder;
+import static com.google.inject.Scopes.*;
import java.lang.reflect.Member;
+import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashSet;
@@ -96,13 +98,6 @@
static final String UNKNOWN_SOURCE = "[unknown source]";
- static final Scope DEFAULT_SCOPE = new Scope() {
- public <T> Factory<T> scope(Key<T> key, Factory<T> creator) {
- // We special case optimize default scope, so this never actually runs.
- throw new AssertionError();
- }
- };
-
final ConstructionProxyFactory constructionProxyFactory;
/**
@@ -111,8 +106,8 @@
* @param constructionProxyFactory to use when constructing objects
*/
public ContainerBuilder(ConstructionProxyFactory constructionProxyFactory) {
- put(Scopes.DEFAULT_SCOPE, DEFAULT_SCOPE);
- put(Scopes.CONTAINER_SCOPE, ContainerScope.INSTANCE);
+ scope(DEFAULT);
+ scope(CONTAINER);
bind(Container.class).to(CONTAINER_FACTORY);
bind(Logger.class).to(LOGGER_FACTORY);
@@ -156,11 +151,11 @@
}
/**
- * Maps a {@link Scope} instance to a given scope name. Scopes should be
- * mapped before used in bindings. @{@link Scoped#value()} references this
- * name.
+ * Adds a new scope. Maps a {@link Scope} instance to a given scope name.
+ * Scopes should be mapped before used in bindings. {@link Scoped#value()}
+ * references this name.
*/
- public void put(String name, Scope scope) {
+ public void scope(String name, Scope scope) {
if (scopes.containsKey(nonNull(name, "name"))) {
addError(source(), ErrorMessages.DUPLICATE_SCOPES, name);
} else {
@@ -169,6 +164,20 @@
}
/**
+ * Adds a new scope. Maps an enum-based {@link Scope} instance using the
+ * enum's name as the scope name. Scopes should be mapped before used in
+ * bindings. {@link Scoped#value()} references this name.
+ */
+ public <E extends Enum<E> & Scope> void scope(E scope) {
+ String name = scope.name();
+ if (scopes.containsKey(nonNull(scope.name(), "name"))) {
+ addError(source(), ErrorMessages.DUPLICATE_SCOPES, name);
+ } else {
+ scopes.put(nonNull(name, "name"), nonNull(scope, "scope"));
+ }
+ }
+
+ /**
* Binds the given key.
*/
public <T> BindingBuilder<T> bind(Key<T> key) {
@@ -420,7 +429,7 @@
putBinding(binding);
// Register to preload if necessary.
- if (builder.isInContainerScope()) {
+ if (builder.isContainerScoped()) {
if (preload || builder.shouldPreload()) {
preloaders.add(new BindingPreloader(key, factory));
}
@@ -552,9 +561,17 @@
}
private void setScopeFromType(Class<?> implementation) {
- Scoped scoped = implementation.getAnnotation(Scoped.class);
- if (scoped != null) {
- in(scoped.value());
+ for (Annotation annotation : implementation.getAnnotations()) {
+ Class<? extends Annotation> annotationType =
+ annotation.annotationType();
+ if (annotationType == Scoped.class) {
+ in(((Scoped) annotation).value());
+ } else {
+ Scoped scoped = annotationType.getAnnotation(Scoped.class);
+ if (scoped != null) {
+ in(scoped.value());
+ }
+ }
}
}
@@ -585,7 +602,7 @@
public BindingBuilder<T> to(T instance) {
ensureImplementationIsNotSet();
this.factory = new ConstantFactory<T>(instance);
- in(Scopes.CONTAINER_SCOPE);
+ in(CONTAINER);
return this;
}
@@ -609,7 +626,7 @@
/**
* Specifies the scope. References the name passed to {@link
- * ContainerBuilder#put(String, Scope)}.
+ * ContainerBuilder#scope(String, Scope)}.
*/
public BindingBuilder<T> in(String scopeName) {
ensureScopeNotSet();
@@ -638,7 +655,7 @@
* Specifies container scope (i.e. one instance per container).
*/
public BindingBuilder<T> inContainerScope() {
- return in(Scopes.CONTAINER_SCOPE);
+ return in(CONTAINER);
}
private void ensureScopeNotSet() {
@@ -668,7 +685,8 @@
to(key.getType());
}
- if (scope == null || scope == DEFAULT_SCOPE) {
+ // Default scope does nothing.
+ if (scope == null || scope == DEFAULT) {
return this.factory;
}
@@ -677,8 +695,8 @@
return new InternalFactoryToFactoryAdapter<T>(scoped);
}
- boolean isInContainerScope() {
- return this.scope == ContainerScope.INSTANCE;
+ boolean isContainerScoped() {
+ return this.scope == Scopes.CONTAINER;
}
}
diff --git a/src/com/google/inject/ContainerImpl.java b/src/com/google/inject/ContainerImpl.java
index 1c92957..217eb0b 100644
--- a/src/com/google/inject/ContainerImpl.java
+++ b/src/com/google/inject/ContainerImpl.java
@@ -581,6 +581,22 @@
});
}
+ public <T> T getInstance(TypeLiteral<T> type, String name) {
+ return getFactory(Key.get(type, name)).get();
+ }
+
+ public <T> T getInstance(Class<T> type, String name) {
+ return getFactory(Key.get(type, name)).get();
+ }
+
+ public <T> Factory<T> getFactory(Class<T> type, String name) {
+ return getFactory(Key.get(type, name));
+ }
+
+ public <T> Factory<T> getFactory(TypeLiteral<T> type, String name) {
+ return getFactory(Key.get(type, name));
+ }
+
public <T> T getInstance(TypeLiteral<T> type) {
return getFactory(Key.get(type)).get();
}
diff --git a/src/com/google/inject/ContainerScope.java b/src/com/google/inject/ContainerScope.java
deleted file mode 100644
index 35c8e11..0000000
--- a/src/com/google/inject/ContainerScope.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (C) 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.inject;
-
-/**
- * Container scope. Returns one instance per {@link Container}.
- *
- * @author crazybob@google.com (Bob Lee)
- */
-class ContainerScope implements Scope {
-
- static final Scope INSTANCE = new ContainerScope();
-
- private ContainerScope() {}
-
- public <T> Factory<T> scope(Key<T> key, final Factory<T> creator) {
- return new Factory<T>() {
-
- private volatile T instance;
-
- public T get() {
- // Double checked locking improves performance and is safe as of Java 5.
- if (instance == null) {
- // Use a pretty coarse lock. We don't want to run into deadlocks when
- // two threads try to load circularly-dependent objects.
- // Maybe one of these days we will identify independent graphs of
- // objects and offer to load them in parallel.
- synchronized (Container.class) {
- if (instance == null) {
- instance = creator.get();
- }
- }
- }
- return instance;
- }
-
- public String toString() {
- return creator.toString();
- }
- };
- }
-}
diff --git a/src/com/google/inject/ContainerScoped.java b/src/com/google/inject/ContainerScoped.java
new file mode 100644
index 0000000..ab8d381
--- /dev/null
+++ b/src/com/google/inject/ContainerScoped.java
@@ -0,0 +1,32 @@
+/**
+ * Copyright (C) 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.inject;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * One instance per container.
+ *
+ * @author crazybob@google.com (Bob Lee)
+ */
+@Target(ElementType.TYPE)
+@Retention(RUNTIME)
+@Scoped("CONTAINER")
+public @interface ContainerScoped {}
diff --git a/src/com/google/inject/ErrorMessages.java b/src/com/google/inject/ErrorMessages.java
index 15516bd..fe5ef5f 100644
--- a/src/com/google/inject/ErrorMessages.java
+++ b/src/com/google/inject/ErrorMessages.java
@@ -77,8 +77,10 @@
+ " Available scope names: %s";
static final String SCOPE_ALREADY_SET = "Scope is set more than once."
- + " You can set the scope by calling in(...) or by annotating the"
- + " implementation class with @Scoped.";
+ + " You can set the scope by calling in(...), by annotating the"
+ + " implementation class with @Scoped, or by annotating the"
+ + " implementation with with an annotation which is annotated with"
+ + " @Scoped.";
static final String CONSTANT_VALUE_ALREADY_SET =
"Constant value is set more than once.";
diff --git a/src/com/google/inject/Scope.java b/src/com/google/inject/Scope.java
index 2472ee6..bd94191 100644
--- a/src/com/google/inject/Scope.java
+++ b/src/com/google/inject/Scope.java
@@ -18,7 +18,7 @@
/**
* A scope which bound objects can reside in. Add a new scope using {@link
- * com.google.inject.ContainerBuilder#put(String, Scope)} and reference it from
+ * com.google.inject.ContainerBuilder#scope(String, Scope)} and reference it from
* bindings using its name.
*
* <p>Scope implementations should override {@code toString()} and include the
diff --git a/src/com/google/inject/Scoped.java b/src/com/google/inject/Scoped.java
index acc7be4..c3dae5e 100644
--- a/src/com/google/inject/Scoped.java
+++ b/src/com/google/inject/Scoped.java
@@ -24,10 +24,14 @@
/**
* Annotates an implementation class with the name of its scope.
*
- * @see com.google.inject.ContainerBuilder#put(String, Scope)
+ * <p>If you apply {@code Scoped} to another annotation, that annotation will
+ * act as an alias and the user will not have to explicitly specify a name.
+ * See {@link com.google.inject.ContainerScoped} for an example.
+ *
+ * @see com.google.inject.ContainerBuilder#scope(String, Scope)
* @author crazybob
*/
-@Target(ElementType.TYPE)
+@Target({ElementType.TYPE, ElementType.ANNOTATION_TYPE})
@Retention(RUNTIME)
public @interface Scoped {
diff --git a/src/com/google/inject/Scopes.java b/src/com/google/inject/Scopes.java
index e519ab2..0498b54 100644
--- a/src/com/google/inject/Scopes.java
+++ b/src/com/google/inject/Scopes.java
@@ -17,19 +17,50 @@
package com.google.inject;
/**
- * Scope constants.
+ * Built in scope implementations.
*
* @author crazybob@google.com (Bob Lee)
*/
-public class Scopes {
+public enum Scopes implements Scope {
/**
- * Default scope's name. One instance per injection.
+ * Instance per injection.
*/
- public static final String DEFAULT_SCOPE = Key.DEFAULT_NAME;
+ DEFAULT {
+ public <T> Factory<T> scope(Key<T> key, Factory<T> creator) {
+ return creator;
+ }
+ },
/**
- * Container scope's name. One instance per {@link Container}.
+ * Instance per container.
*/
- public static final String CONTAINER_SCOPE = "container";
+ CONTAINER {
+ public <T> Factory<T> scope(Key<T> key, final Factory<T> creator) {
+ return new Factory<T>() {
+
+ private volatile T instance;
+
+ public T get() {
+ // Double checked locking improves performance and is safe as of Java 5.
+ if (instance == null) {
+ // Use a pretty coarse lock. We don't want to run into deadlocks when
+ // two threads try to load circularly-dependent objects.
+ // Maybe one of these days we will identify independent graphs of
+ // objects and offer to load them in parallel.
+ synchronized (Container.class) {
+ if (instance == null) {
+ instance = creator.get();
+ }
+ }
+ }
+ return instance;
+ }
+
+ public String toString() {
+ return creator.toString();
+ }
+ };
+ }
+ }
}
\ No newline at end of file
diff --git a/test/com/google/inject/CircularDependencyTest.java b/test/com/google/inject/CircularDependencyTest.java
index c6dfcb4..ec77802 100644
--- a/test/com/google/inject/CircularDependencyTest.java
+++ b/test/com/google/inject/CircularDependencyTest.java
@@ -40,7 +40,7 @@
B getB();
}
- @Scoped(CONTAINER_SCOPE)
+ @ContainerScoped
static class AImpl implements A {
final B b;
@Inject public AImpl(B b) {
diff --git a/test/com/google/inject/ContainerTest.java b/test/com/google/inject/ContainerTest.java
index 10ee913..1fcb15e 100644
--- a/test/com/google/inject/ContainerTest.java
+++ b/test/com/google/inject/ContainerTest.java
@@ -16,7 +16,7 @@
package com.google.inject;
-import static com.google.inject.Scopes.CONTAINER_SCOPE;
+import static com.google.inject.Scopes.CONTAINER;
import junit.framework.TestCase;
@@ -27,9 +27,11 @@
public void testFactoryMethods() throws ContainerCreationException {
Singleton singleton = new Singleton();
+ Singleton other = new Singleton();
ContainerBuilder builder = new ContainerBuilder();
builder.bind(Singleton.class).to(singleton);
+ builder.bind(Singleton.class).named("other").to(other);
Container container = builder.create(true);
assertSame(singleton,
@@ -41,6 +43,16 @@
assertSame(singleton, container.getInstance(Singleton.class));
assertSame(singleton,
container.getInstance(new TypeLiteral<Singleton>() {}));
+
+ assertSame(other,
+ container.getFactory(Key.get(Singleton.class, "other")).get());
+ assertSame(other, container.getFactory(Singleton.class, "other").get());
+ assertSame(other,
+ container.getFactory(new TypeLiteral<Singleton>() {}, "other").get());
+ assertSame(other, container.getInstance(Key.get(Singleton.class, "other")));
+ assertSame(other, container.getInstance(Singleton.class, "other"));
+ assertSame(other,
+ container.getInstance(new TypeLiteral<Singleton>() {}, "other"));
}
static class Singleton {}
@@ -116,7 +128,7 @@
int getI();
}
- @Scoped(CONTAINER_SCOPE)
+ @ContainerScoped
static class BarImpl implements Bar {
@Inject("i") int i;
@@ -177,7 +189,7 @@
B getB();
}
- @Scoped(CONTAINER_SCOPE)
+ @ContainerScoped
static class AImpl implements A {
final B b;
@Inject public AImpl(B b) {
diff --git a/test/com/google/inject/FactoryInjectionTest.java b/test/com/google/inject/FactoryInjectionTest.java
index 1a97ab7..f7fdd92 100644
--- a/test/com/google/inject/FactoryInjectionTest.java
+++ b/test/com/google/inject/FactoryInjectionTest.java
@@ -27,7 +27,7 @@
ContainerBuilder builder = new ContainerBuilder();
builder.bind(Bar.class);
- builder.bind(ContainerScoped.class).in(Scopes.CONTAINER_SCOPE);
+ builder.bind(ContainerScoped.class).in(Scopes.CONTAINER);
Container container = builder.create(false);
diff --git a/test/com/google/inject/FactoryTest.java b/test/com/google/inject/FactoryTest.java
index 279f7ee..0517ca3 100644
--- a/test/com/google/inject/FactoryTest.java
+++ b/test/com/google/inject/FactoryTest.java
@@ -86,7 +86,7 @@
cb.bind(Bar.class)
.named("fooBar")
.to(createFactory(Bar.class, "fooBar", null))
- .in(Scopes.CONTAINER_SCOPE);
+ .in(Scopes.CONTAINER);
cb.bind(Tee.class).named("tee1")
.to(createFactory(Tee.class, "tee1",
diff --git a/test/com/google/inject/PerformanceComparison.java b/test/com/google/inject/PerformanceComparison.java
index 7e8583a..79dc194 100644
--- a/test/com/google/inject/PerformanceComparison.java
+++ b/test/com/google/inject/PerformanceComparison.java
@@ -16,7 +16,7 @@
package com.google.inject;
-import static com.google.inject.Scopes.CONTAINER_SCOPE;
+import static com.google.inject.Scopes.CONTAINER;
import static junit.framework.Assert.*;
@@ -214,7 +214,7 @@
String getS();
}
- @Scoped(CONTAINER_SCOPE)
+ @ContainerScoped
public static class TeeImpl implements Tee {
final String s;
diff --git a/test/com/google/inject/PreloadingTest.java b/test/com/google/inject/PreloadingTest.java
index add21e4..a03dfff 100644
--- a/test/com/google/inject/PreloadingTest.java
+++ b/test/com/google/inject/PreloadingTest.java
@@ -16,7 +16,7 @@
package com.google.inject;
-import static com.google.inject.Scopes.CONTAINER_SCOPE;
+import static com.google.inject.Scopes.CONTAINER;
import junit.framework.TestCase;
@@ -46,7 +46,7 @@
private ContainerBuilder createContainerBuilder() {
ContainerBuilder builder = new ContainerBuilder();
- builder.bind(Foo.class).in(CONTAINER_SCOPE).preload();
+ builder.bind(Foo.class).in(CONTAINER).preload();
builder.bind(Bar.class);
return builder;
}
@@ -67,7 +67,7 @@
}
}
- @Scoped(CONTAINER_SCOPE)
+ @ContainerScoped
static class Bar {
static int count = 0;
public Bar() {