package de.skuzzle.tinyplugz;

import java.io.Closeable;
import java.io.IOException;
import java.net.URL;
import java.util.Collection;

/**
 * Used to connect class- and resource loading between different plugins.
 *
 * @author Simon Taddiken
 */
interface DependencyResolver extends Closeable {

    /**
     * Returns a simple displayable name for this resolver.
     *
     * @return The name.
     */
    public String getSimpleName();

    /**
     * Searches for a class with given name.
     *
     * @param requestor The plugin for which the Class should be searched.
     *            Parameter will be <code>null</code> if this method is not
     *            called from any plugin (but from the application itself).
     * @param name The name of the class to search for. Must not be
     *            <code>null</code>.
     * @return The class or <code>null</code> if none was found.
     */
    public Class<?> findClass(DependencyResolver requestor, String name);

    /**
     * Searches for a resource with given name.
     *
     * @param requestor The plugin for which the resource should be searched.
     *            Parameter will be <code>null</code> if this method is not
     *            called from any plugin (but from the application itself).
     * @param name The name of the resource to search for.
     * @return An URL to the resource or <code>null</code> if none was found.
     */
    public URL findResource(DependencyResolver requestor, String name);

    /**
     * Searches for all resources with given name and collects them in the given
     * collection.
     *
     * @param requestor The plugin for which the resources should be collected.
     *            Parameter will be <code>null</code> if this method is not
     *            called from any plugin (but from the application itself).
     * @param name The name of the resource. Must not be <code>null</code>.
     * @param target Target collection.
     * @throws IOException If an IO error occurs.
     */
    public void findResources(DependencyResolver requestor, String name,
            Collection<URL> target) throws IOException;
}

@@ -129,16 +129,104 @@
 ction;%0A%0A
+import org.eclipse.jdt.annotation.NonNull;%0Aimport org.eclipse.jdt.annotation.Nullable;%0A%0A
 /**%0A * U
@@ -979,32 +979,46 @@
  found.%0A     */%0A
+    @Nullable%0A
     public Class
@@ -1031,16 +1031,26 @@
 ndClass(
+@Nullable 
 Dependen
@@ -1062,32 +1062,53 @@
 olver requestor,
+%0A            @NonNull
  String name);%0A%0A
@@ -1537,32 +1537,46 @@
  found.%0A     */%0A
+    @Nullable%0A
     public URL f
@@ -1587,16 +1587,26 @@
 esource(
+@Nullable 
 Dependen
@@ -1618,32 +1618,41 @@
 olver requestor,
+ @NonNull
  String name);%0A%0A
@@ -2202,16 +2202,39 @@
 sources(
+%0A            @Nullable 
 Dependen
@@ -2254,16 +2254,37 @@
 questor,
+%0A            @NonNull
  String 
@@ -2301,16 +2301,25 @@
         
+@NonNull 
 Collecti

Add null check annotations