Package org.apache.xbean.finder

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


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

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

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


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

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

                }
            }

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

            for (final 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

            }

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

            for (final 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)");
            final List<Class<?>> appExceptions = finder.findAnnotatedClasses(ApplicationException.class);
            for (final Class<?> exceptionClass : appExceptions) {
                startupLogger.debug("...handling " + exceptionClass);
                final 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 (final Class<?> clazz : classes) {
                                final String name = clazz.getName();
View Full Code Here

                            }

                            // 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)) {
View Full Code Here

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

            final 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) { //NOPMD
                    // TODO: fail some validation here too
View Full Code Here

                    outboundResourceAdapter.setReauthenticationSupport(connectorAnnotation.reauthenticationSupport());
                }
            }

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

                for (final ConnectionDefinition definition : definitions) {
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.