Package org.apache.xbean.finder

Examples of org.apache.xbean.finder.ClassFinder


      return PortableRemoteObject.narrow(object, type);
    }
   
    protected final void processFieldInjections() {
      Object home = null;
      ClassFinder finder = null;
      List<Field> fieldList = null;
     
      finder = new ClassFinder(getClassPath());
      fieldList = finder.findAnnotatedFields(EJB.class);
      for(Iterator fields = fieldList.iterator(); fields.hasNext();) {
        Field field = (Field) fields.next();
        EJB ejbAnnotation = field.getAnnotation(EJB.class);
        if( (ejbAnnotation.name() != null) && (ejbAnnotation.name() != "") && (ejbAnnotation.beanInterface() != null)) {
          try {
View Full Code Here


      }
    }
   
    protected final void processSetterInjections() {
      Object home = null;
      ClassFinder finder = null;
      List<Method> methodList = null;
     
      finder = new ClassFinder(getClassPath());
      methodList = finder.findAnnotatedMethods(EJB.class);
      for(Iterator methods = methodList.iterator(); methods.hasNext();) {
        Method method = (Method) methods.next();
        EJB ejbAnnotation = method.getAnnotation(EJB.class);
        if( (ejbAnnotation.name() != null) && (ejbAnnotation.name() != "") && (ejbAnnotation.beanInterface() != null)) {
          try {
View Full Code Here

        //  Create an InterceptorData for the webservice interceptor to the list of interceptorDatas for this method
        List<InterceptorData> interceptorDatas = new ArrayList<InterceptorData>(beanContext.getMethodInterceptors(runMethod));
        {
            InterceptorData providerData = new InterceptorData(interceptor.getClass());
            ClassFinder finder = new ClassFinder(interceptor.getClass());
            providerData.getAroundInvoke().addAll(finder.findAnnotatedMethods(AroundInvoke.class));
            interceptorDatas.add(providerData);
        }

        InterceptorStack interceptorStack = new InterceptorStack(instance.bean, runMethod, Operation.BUSINESS_WS, interceptorDatas, interceptors);
        Object[] params = new Object[runMethod.getParameterTypes().length];
View Full Code Here

    public int hashCode() {
        return (clazz != null ? clazz.hashCode() : 0);
    }

    public static InterceptorData scan(Class<?> clazz) {
        ClassFinder finder = new ClassFinder(clazz);

        InterceptorData data = new InterceptorData(clazz);

        add(finder, data.aroundInvoke, AroundInvoke.class);
        add(finder, data.postConstruct, PostConstruct.class);
View Full Code Here

    }

    private EjbModule testModule() {
        EjbJar ejbJar = new EjbJar("test-classes");
        EjbModule ejbModule = new EjbModule(ejbJar);
        ejbModule.setFinder(new ClassFinder(AnnotationDeployerTest.class,
                BusinessException.class,
                Exception.class,
                GenericInterface.class,
                InterceptedSLSBean.class,
                MyMainClass.class,
View Full Code Here

    }

    private ConnectorModule testConnectorModule() {
      Connector connector = new Connector();
      ConnectorModule connectorModule = new ConnectorModule(connector);
        connectorModule.setFinder(new ClassFinder(TestConnector.class, TestManagedConnectionFactory.class, TestActivation.class, TestAdminObject.class));
        return connectorModule;
    }
View Full Code Here

        return connectorModule;
    }
   
    @Test
    public void testConfigProperties() throws Exception {
      ClassFinder finder = new ClassFinder(TestAdminObject.class);
     
      final List<ConfigProperty> configProperty = new ArrayList<ConfigProperty>();
     
    Object object = new Object() {
       public List<ConfigProperty> getConfigProperty() {
View Full Code Here

        //  Create an InterceptorData for the webservice interceptor to the list of interceptorDatas for this method
        List<InterceptorData> interceptorDatas = new ArrayList<InterceptorData>(beanContext.getMethodInterceptors(runMethod));
        {
            InterceptorData providerData = new InterceptorData(interceptor.getClass());
            ClassFinder finder = new ClassFinder(interceptor.getClass());
            providerData.getAroundInvoke().addAll(finder.findAnnotatedMethods(AroundInvoke.class));
//            interceptorDatas.add(providerData);
            interceptorDatas.add(0, providerData);
        }

        InterceptorStack interceptorStack = new InterceptorStack(instance.bean, runMethod, Operation.BUSINESS_WS, interceptorDatas, interceptors);
View Full Code Here

                    } catch (OpenEJBException e) {
                        //ignore ?
                    }
                }
            } else {
                ClassFinder classFinder = new ClassFinder(ejbClass);
                for (Method method : classFinder.findAnnotatedMethods(Asynchronous.class)) {
                    ignoredMethodAnnotation("Asynchronous", bean, bean.getEjbClass(), method.getName(), bean.getClass().getSimpleName());
                }
                if (ejbClass.getAnnotation(Asynchronous.class) != null) {
                    ignoredClassAnnotation("Asynchronous", bean, bean.getEjbClass(), bean.getClass().getSimpleName());
                }
View Full Code Here

        tag = Strings.lcfirst(Strings.camelCase(tag));

        if (isValidInterface(b, interfce, beanClass, tag));

        ClassFinder finder = new ClassFinder(interfce);

        for (Class<? extends Annotation> annotation : beanOnlyAnnotations) {

            if (interfce.isAnnotationPresent(annotation)){
                warn(b, "interface.beanOnlyAnnotation", annotation.getSimpleName(), interfce.getName(), b.getEjbClass());
            }

            for (Method method : finder.findAnnotatedMethods(annotation)) {
                warn(b, "interfaceMethod.beanOnlyAnnotation", annotation.getSimpleName(), interfce.getName(), method.getName(), b.getEjbClass());
            }
        }

    }
View Full Code Here

TOP

Related Classes of org.apache.xbean.finder.ClassFinder

Copyright © 2018 www.massapicom. 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.