Merge with trunk separate-lookup-170056
authorJaroslav Tulach <jtulach@netbeans.org>
Sun, 08 Nov 2009 21:49:27 +0100
branchseparate-lookup-170056
changeset 851b0ddeb781b30
parent 850 3698f1254400
parent 846 1497742f45ca
child 858 7d4870dec1fc
Merge with trunk
openide.util.lookup/src/org/netbeans/modules/openide/util/ServiceProviderProcessor.java
     1.1 --- a/openide.util.lookup/src/org/netbeans/modules/openide/util/ServiceProviderProcessor.java	Sat Nov 07 13:32:43 2009 +0100
     1.2 +++ b/openide.util.lookup/src/org/netbeans/modules/openide/util/ServiceProviderProcessor.java	Sun Nov 08 21:49:27 2009 +0100
     1.3 @@ -40,14 +40,15 @@
     1.4  package org.netbeans.modules.openide.util;
     1.5  
     1.6  import java.lang.annotation.Annotation;
     1.7 +import java.util.Arrays;
     1.8  import java.util.Collection;
     1.9  import java.util.Collections;
    1.10 +import java.util.HashSet;
    1.11  import java.util.LinkedList;
    1.12  import java.util.List;
    1.13  import java.util.Set;
    1.14  import javax.annotation.processing.Completion;
    1.15  import javax.annotation.processing.RoundEnvironment;
    1.16 -import javax.annotation.processing.SupportedAnnotationTypes;
    1.17  import javax.annotation.processing.SupportedSourceVersion;
    1.18  import javax.lang.model.SourceVersion;
    1.19  import javax.lang.model.element.AnnotationMirror;
    1.20 @@ -61,9 +62,15 @@
    1.21  import org.openide.util.lookup.ServiceProviders;
    1.22  
    1.23  @SupportedSourceVersion(SourceVersion.RELEASE_6)
    1.24 -@SupportedAnnotationTypes({"org.openide.util.lookup.ServiceProvider", "org.openide.util.lookup.ServiceProviders"})
    1.25  public class ServiceProviderProcessor extends AbstractServiceProviderProcessor {
    1.26  
    1.27 +    public @Override Set<String> getSupportedAnnotationTypes() {
    1.28 +        return new HashSet<String>(Arrays.asList(
    1.29 +            ServiceProvider.class.getCanonicalName(),
    1.30 +            ServiceProviders.class.getCanonicalName()
    1.31 +        ));
    1.32 +    }
    1.33 +
    1.34      /** public for ServiceLoader */
    1.35      public ServiceProviderProcessor() {}
    1.36  
     2.1 --- a/openide.util/src/org/netbeans/modules/openide/util/URLStreamHandlerRegistrationProcessor.java	Sat Nov 07 13:32:43 2009 +0100
     2.2 +++ b/openide.util/src/org/netbeans/modules/openide/util/URLStreamHandlerRegistrationProcessor.java	Sun Nov 08 21:49:27 2009 +0100
     2.3 @@ -40,9 +40,9 @@
     2.4  package org.netbeans.modules.openide.util;
     2.5  
     2.6  import java.net.URLStreamHandler;
     2.7 +import java.util.Collections;
     2.8  import java.util.Set;
     2.9  import javax.annotation.processing.RoundEnvironment;
    2.10 -import javax.annotation.processing.SupportedAnnotationTypes;
    2.11  import javax.annotation.processing.SupportedSourceVersion;
    2.12  import javax.lang.model.SourceVersion;
    2.13  import javax.lang.model.element.Element;
    2.14 @@ -51,11 +51,12 @@
    2.15  import org.openide.util.URLStreamHandlerRegistration;
    2.16  
    2.17  @SupportedSourceVersion(SourceVersion.RELEASE_6)
    2.18 -@SupportedAnnotationTypes({
    2.19 -    "org.openide.util.URLStreamHandlerRegistration"
    2.20 -})
    2.21  public class URLStreamHandlerRegistrationProcessor extends AbstractServiceProviderProcessor {
    2.22  
    2.23 +    public @Override Set<String> getSupportedAnnotationTypes() {
    2.24 +        return Collections.singleton(URLStreamHandlerRegistration.class.getCanonicalName());
    2.25 +    }
    2.26 +
    2.27      public static final String REGISTRATION_PREFIX = "URLStreamHandler/"; // NOI18N
    2.28  
    2.29      /** public for ServiceLoader */