org.openide.util.lookup.ServiceProvider Java Examples

The following examples show how to use org.openide.util.lookup.ServiceProvider. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ServiceProviderProcessor.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private void register(Element clazz, Class<? extends Annotation> annotation, ServiceProvider svc) {
    try {
        svc.service();
        assert false;
        return;
    } catch (MirroredTypeException e) {
        register(clazz, annotation, e.getTypeMirror(), svc.path(), svc.position(), svc.supersedes());
    }
}
 
Example #2
Source File: ServiceProviderProcessor.java    From netbeans with Apache License 2.0 4 votes vote down vote up
public @Override Set<String> getSupportedAnnotationTypes() {
    return new HashSet<String>(Arrays.asList(
        ServiceProvider.class.getCanonicalName(),
        ServiceProviders.class.getCanonicalName()
    ));
}