Package org.apache.xbean.finder

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


                            // no need of meta currently since JPA providers doesn't support it
                            final List<Class<?>> classes = new ArrayList<Class<?>>();
                            classes.addAll(finder.findAnnotatedClasses(Entity.class));
                            classes.addAll(finder.findAnnotatedClasses(Embeddable.class));
                            classes.addAll(finder.findAnnotatedClasses(MappedSuperclass.class));
                            final List<String> existingClasses = pu.getClazz();
                            for (final Class<?> clazz : classes) {
                                final String name = clazz.getName();
                                if (existingClasses.contains(name)) {
                                    continue;
View Full Code Here


          // 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

          } 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

        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

          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

            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

                }
            }

            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

            }

            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

                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

                                packageNames = packageName.split(",");
                            }

                            // no need of meta currently since JPA providers doesn't support it
                            final List<Class<?>> classes = new ArrayList<Class<?>>();
                            classes.addAll(finder.findAnnotatedClasses(Entity.class));
                            classes.addAll(finder.findAnnotatedClasses(Embeddable.class));
                            classes.addAll(finder.findAnnotatedClasses(MappedSuperclass.class));
                            final List<String> existingClasses = pu.getClazz();
                            for (Class<?> clazz : classes) {
                                final String name = clazz.getName();
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.