public static Set < Object > findInstancesInScopes ( Injector injector , Class < ? extends Annotation > ... scopeAnnotations ) { Set < Object > objects = new TreeSet < Object > ( new Comparator < Object > ( ) { @ Override public int compare ( Object o0 , Object o1 ) { return o0 . getClass ( ) . getName ( ) . compareTo ( o1 . getClass ( ) . getName ( ) ) ; } } ) ; for ( Map . Entry < Key < ? > , Binding < ? > > entry : findBindingsInScope ( injector , scopeAnnotations ) . entrySet ( ) ) { Object object = injector . getInstance ( entry . getKey ( ) ) ; objects . add ( object ) ; } return objects ; }
Finds all of the instances in the specified scopes .