"Lookup" is a backformation from "[to] look [something] up". version-2-3-54
authorjglick@netbeans.org
Fri, 11 Nov 2005 23:14:02 +0000
changeset 86c7f69e7c0a03
parent 85 6164fdeda0a6
child 87 bd6cb339885b
"Lookup" is a backformation from "[to] look [something] up".
openide.util/src/org/openide/util/Lookup.java
openide.util/src/org/openide/util/lookup/AbstractLookup.java
openide.util/src/org/openide/util/lookup/ProxyLookup.java
     1.1 --- a/openide.util/src/org/openide/util/Lookup.java	Fri Nov 11 16:49:03 2005 +0000
     1.2 +++ b/openide.util/src/org/openide/util/Lookup.java	Fri Nov 11 23:14:02 2005 +0000
     1.3 @@ -412,23 +412,12 @@
     1.4      //
     1.5      private static final class Empty extends Lookup {
     1.6          private static final Result NO_RESULT = new Result() {
     1.7 -                /** Registers a listener that is invoked when there is a possible
     1.8 -                 * change in this result.
     1.9 -                 *
    1.10 -                 * @param l listener to invoke when there is an change
    1.11 -                 */
    1.12                  public void addLookupListener(LookupListener l) {
    1.13                  }
    1.14  
    1.15 -                /** Unregisters a listener previously added by addChangeListener.
    1.16 -                 * @param l the listener
    1.17 -                 */
    1.18                  public void removeLookupListener(LookupListener l) {
    1.19                  }
    1.20  
    1.21 -                /** Access to all instances in the result.
    1.22 -                 * @return collection of all instances
    1.23 -                 */
    1.24                  public java.util.Collection allInstances() {
    1.25                      return java.util.Collections.EMPTY_SET;
    1.26                  }
    1.27 @@ -437,22 +426,10 @@
    1.28          Empty() {
    1.29          }
    1.30  
    1.31 -        /** Lookups an object of given interface. This is the simplest method
    1.32 -         * for the lookuping, if more registered objects implement the given
    1.33 -         * class any of them can be returned.
    1.34 -         *
    1.35 -         * @param clazz class of the object we are searching for
    1.36 -         * @return the object implementing given class or null if no such
    1.37 -         *   has been found
    1.38 -         */
    1.39          public Object lookup(Class clazz) {
    1.40              return null;
    1.41          }
    1.42  
    1.43 -        /** The general lookup method.
    1.44 -         * @param template the template describing the services we are looking for
    1.45 -         * @return object containing the results
    1.46 -         */
    1.47          public Result lookup(Template template) {
    1.48              return NO_RESULT;
    1.49          }
     2.1 --- a/openide.util/src/org/openide/util/lookup/AbstractLookup.java	Fri Nov 11 16:49:03 2005 +0000
     2.2 +++ b/openide.util/src/org/openide/util/lookup/AbstractLookup.java	Fri Nov 11 23:14:02 2005 +0000
     2.3 @@ -330,24 +330,12 @@
     2.4          }
     2.5      }
     2.6  
     2.7 -    /** Lookups an object of given interface. This is the simplest method
     2.8 -     * for the lookuping, if more registered objects implement the given
     2.9 -     * class any of them can be returned.
    2.10 -     *
    2.11 -     * @param clazz class of the object we are searching for
    2.12 -     * @return the object implementing given class or null if no such
    2.13 -     *    has been found
    2.14 -     */
    2.15      public final Object lookup(Class clazz) {
    2.16          Lookup.Item item = lookupItem(new Lookup.Template(clazz));
    2.17  
    2.18          return (item == null) ? null : item.getInstance();
    2.19      }
    2.20  
    2.21 -    /** Lookups just one item.
    2.22 -     * @param template a template for what to find
    2.23 -     * @return item or null
    2.24 -     */
    2.25      public final Lookup.Item lookupItem(Lookup.Template template) {
    2.26          AbstractLookup.this.beforeLookup(template);
    2.27  
    2.28 @@ -403,10 +391,6 @@
    2.29          return res;
    2.30      }
    2.31  
    2.32 -    /** The general lookup method.
    2.33 -     * @param template the template describing the services we are looking for
    2.34 -     * @return object containing the results
    2.35 -     */
    2.36      public final Lookup.Result lookup(Lookup.Template template) {
    2.37          for (;;) {
    2.38              AbstractLookup.ISE toRun = null;
     3.1 --- a/openide.util/src/org/openide/util/lookup/ProxyLookup.java	Fri Nov 11 16:49:03 2005 +0000
     3.2 +++ b/openide.util/src/org/openide/util/lookup/ProxyLookup.java	Fri Nov 11 23:14:02 2005 +0000
     3.3 @@ -163,14 +163,6 @@
     3.4      protected void beforeLookup(Template template) {
     3.5      }
     3.6  
     3.7 -    /* Lookups an object of given interface. This is the simplest method
     3.8 -     * for the lookuping, if more registered objects implement the given
     3.9 -     * class any of them can be returned.
    3.10 -     *
    3.11 -     * @param clazz class of the object we are searching for
    3.12 -     * @return the object implementing given class or null if no such
    3.13 -     *    has been found
    3.14 -     */
    3.15      public final Object lookup(Class clazz) {
    3.16          beforeLookup(new Template(clazz));
    3.17  
    3.18 @@ -187,10 +179,6 @@
    3.19          return null;
    3.20      }
    3.21  
    3.22 -    /* Lookups the first item that matches given template.
    3.23 -     * @param template the template to check
    3.24 -     * @return item or null
    3.25 -     */
    3.26      public final Item lookupItem(Template template) {
    3.27          beforeLookup(template);
    3.28  
    3.29 @@ -207,10 +195,6 @@
    3.30          return null;
    3.31      }
    3.32  
    3.33 -    /* The general lookup method.
    3.34 -     * @param template the template describing the services we are looking for
    3.35 -     * @return object containing the results
    3.36 -     */
    3.37      public final synchronized Result lookup(Lookup.Template template) {
    3.38          R r;
    3.39