Examples of findAnnotatedClasses()


Examples of org.apache.xbean.finder.IAnnotationFinder.findAnnotatedClasses()

          // TODO: some sort of error
          return connectorModule;
        }
          }

          List<Class<?>> connectorClasses = finder.findAnnotatedClasses(Connector.class);

          // are we allowed to have more than one connector class? Not without a deployment descriptor
          if (connector.getResourceAdapter() == null || connector.getResourceAdapter().getResourceAdapterClass() == null ||  connector.getResourceAdapter().getResourceAdapterClass().length() == 0) {
            if (connectorClasses.size() == 0) {
              // fail some validation here too
View Full Code Here

Examples of org.apache.xbean.finder.IAnnotationFinder.findAnnotatedClasses()

          } else {
            // we couldn't process a connector class - probably a validation issue which we should warn about.
          }

          // process @ConnectionDescription(s)
          List<Class<?>> classes = finder.findAnnotatedClasses(ConnectionDefinitions.class);
          for (Class<?> cls : classes) {
        ConnectionDefinitions connectionDefinitionsAnnotation = cls.getAnnotation(ConnectionDefinitions.class);
        ConnectionDefinition[] definitions = connectionDefinitionsAnnotation.value();

        for (ConnectionDefinition definition : definitions) {
View Full Code Here

Examples of org.apache.xbean.finder.IAnnotationFinder.findAnnotatedClasses()

        for (ConnectionDefinition definition : definitions) {
          processConnectionDescription(connector.getResourceAdapter(), definition, cls);
        }
      }

          classes = finder.findAnnotatedClasses(ConnectionDefinition.class);
          for (Class<?> cls : classes) {
        ConnectionDefinition connectionDefinitionAnnotation = cls.getAnnotation(ConnectionDefinition.class);
        processConnectionDescription(connector.getResourceAdapter(), connectionDefinitionAnnotation, cls);
      }
View Full Code Here

Examples of org.apache.xbean.finder.IAnnotationFinder.findAnnotatedClasses()

          if (messageAdapter == null) {
            messageAdapter = new MessageAdapter();
            inboundResourceAdapter.setMessageAdapter(messageAdapter);
          }

          classes = finder.findAnnotatedClasses(Activation.class);
          for (Class<?> cls : classes) {
            MessageListener messageListener = null;
            Activation activationAnnotation = cls.getAnnotation(Activation.class);

            List<MessageListener> messageListeners = messageAdapter.getMessageListener();
View Full Code Here

Examples of org.apache.xbean.finder.IAnnotationFinder.findAnnotatedClasses()

            messageAdapter.addMessageListener(new MessageListener(listener.getName(), cls.getName()));
          }
        }
      }

          classes = finder.findAnnotatedClasses(AdministeredObject.class);
          List<AdminObject> adminObjects = connector.getResourceAdapter().getAdminObject();
          for (Class<?> cls : classes) {
        AdministeredObject administeredObjectAnnotation = cls.getAnnotation(AdministeredObject.class);
        Class[] adminObjectInterfaces = administeredObjectAnnotation.adminObjectInterfaces();
View Full Code Here

Examples of org.apache.xbean.finder.IAnnotationFinder.findAnnotatedClasses()

                }
            }

            IAnnotationFinder finder = webModule.getFinder();
            List<Class> classes = new ArrayList<Class>();
            classes.addAll(finder.findAnnotatedClasses(WebService.class));
            classes.addAll(finder.findAnnotatedClasses(WebServiceProvider.class));

            for (Class<?> webServiceClass : classes) {
                // If this class is also annotated @Stateless or @Singleton, we should skip it
                if (webServiceClass.isAnnotationPresent(Singleton.class) || webServiceClass.isAnnotationPresent(Stateless.class)) {
View Full Code Here

Examples of org.apache.xbean.finder.IAnnotationFinder.findAnnotatedClasses()

            }

            IAnnotationFinder finder = webModule.getFinder();
            List<Class> classes = new ArrayList<Class>();
            classes.addAll(finder.findAnnotatedClasses(WebService.class));
            classes.addAll(finder.findAnnotatedClasses(WebServiceProvider.class));

            for (Class<?> webServiceClass : classes) {
                // If this class is also annotated @Stateless or @Singleton, we should skip it
                if (webServiceClass.isAnnotationPresent(Singleton.class) || webServiceClass.isAnnotationPresent(Stateless.class)) {
                    webModule.getEjbWebServices().add(webServiceClass.getName());
View Full Code Here

Examples of org.apache.xbean.finder.IAnnotationFinder.findAnnotatedClasses()

                    clazz = (Class<? extends Annotation>) classLoader.loadClass(apiClassName);
                } catch (ClassNotFoundException e) {
                    continue;
                }

                final List<Class<?>> found = finder.findAnnotatedClasses(clazz);
                for (Class<?> annotatedClass : found) {
                    webModule.getWebAnnotatedClasses().add(annotatedClass.getName());
                }
            }
View Full Code Here

Examples of org.apache.xbean.finder.IAnnotationFinder.findAnnotatedClasses()

                assemblyDescriptor = new AssemblyDescriptor();
                ejbModule.getEjbJar().setAssemblyDescriptor(assemblyDescriptor);
            }

            startupLogger.debug("Searching for annotated application exceptions (see OPENEJB-980)");
            List<Class<?>> appExceptions = finder.findAnnotatedClasses(ApplicationException.class);
            for (Class<?> exceptionClass : appExceptions) {
                startupLogger.debug("...handling " + exceptionClass);
                ApplicationException annotation = exceptionClass.getAnnotation(ApplicationException.class);
                if (assemblyDescriptor.getApplicationException(exceptionClass) == null) {
                    startupLogger.debug("...adding " + exceptionClass + " with rollback=" + annotation.rollback());
View Full Code Here

Examples of org.apache.xbean.finder.IAnnotationFinder.findAnnotatedClasses()

                        clazz = (Class<? extends Annotation>) classLoader.loadClass(apiClassName);
                    } catch (ClassNotFoundException e) {
                        continue;
                    }

                    final List<Class<?>> found = finder.findAnnotatedClasses(clazz);
                    classes.addAll(found);
                }
            }

            AnnotationFinder annotationFinder = createFinder(classes.toArray(new Class<?>[classes.size()]));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.