Package org.apache.xbean.finder

Examples of org.apache.xbean.finder.ClassFinder.findAnnotatedFields()


        System.getProperties().put(OPENEJB_APPLICATION_COMPOSER_CONTEXT, appContext.getGlobalJndiContext());

        // test injections
        final ClassFinder testClassFinder = testClassFinders.remove(inputTestInstance);
        final List<Field> fields = new ArrayList<Field>(testClassFinder.findAnnotatedFields(AppResource.class));
        fields.addAll(testClassFinder.findAnnotatedFields(org.apache.openejb.junit.AppResource.class));
        for (final Field field : fields) {
            final Class<?> type = field.getType();
            if (AppModule.class.isAssignableFrom(type)) {
                field.setAccessible(true);
                field.set(inputTestInstance, appModule);
View Full Code Here


        System.getProperties().put(OPENEJB_APPLICATION_COMPOSER_CONTEXT, appContext.getGlobalJndiContext());

        // test injections
        final ClassFinder testClassFinder = testClassFinders.remove(inputTestInstance);
        final List<Field> fields = new ArrayList<Field>(testClassFinder.findAnnotatedFields(AppResource.class));
        fields.addAll(testClassFinder.findAnnotatedFields(org.apache.openejb.junit.AppResource.class));
        for (final Field field : fields) {
            final Class<?> type = field.getType();
            if (AppModule.class.isAssignableFrom(type)) {
                field.setAccessible(true);
View Full Code Here

        System.getProperties().put(OPENEJB_APPLICATION_COMPOSER_CONTEXT, appContext.getGlobalJndiContext());

        // test injections
        final ClassFinder testClassFinder = testClassFinders.remove(inputTestInstance);
        final List<Field> fields = new ArrayList<Field>(testClassFinder.findAnnotatedFields(AppResource.class));
        fields.addAll(testClassFinder.findAnnotatedFields(org.apache.openejb.junit.AppResource.class));
        for (final Field field : fields) {
            final Class<?> type = field.getType();
            if (AppModule.class.isAssignableFrom(type)) {
                field.setAccessible(true);
                field.set(inputTestInstance, appModule);
View Full Code Here

      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

        Object home = null;
        ClassFinder finder = null;
        List<Field> fieldList = null;

        finder = new ClassFinder(getClassPath());
        fieldList = finder.findAnnotatedFields(EJB.class);
        for (final Iterator fields = fieldList.iterator(); fields.hasNext(); ) {
            final Field field = (Field) fields.next();
            final EJB ejbAnnotation = field.getAnnotation(EJB.class);
            if ((ejbAnnotation.name() != null) && (ejbAnnotation.name() != "") && (ejbAnnotation.beanInterface() != null)) {
                try {
View Full Code Here

        System.getProperties().put(OPENEJB_APPLICATION_COMPOSER_CONTEXT, appContext.getGlobalJndiContext());

        // test injections
        final ClassFinder testClassFinder = testClassFinders.remove(inputTestInstance);
        final List<Field> fields = new ArrayList<>(testClassFinder.findAnnotatedFields(AppResource.class));
        fields.addAll(testClassFinder.findAnnotatedFields(org.apache.openejb.junit.AppResource.class));
        for (final Field field : fields) {
            final Class<?> type = field.getType();
            if (AppModule.class.isAssignableFrom(type)) {
                field.setAccessible(true);
View Full Code Here

        System.getProperties().put(OPENEJB_APPLICATION_COMPOSER_CONTEXT, appContext.getGlobalJndiContext());

        // test injections
        final ClassFinder testClassFinder = testClassFinders.remove(inputTestInstance);
        final List<Field> fields = new ArrayList<>(testClassFinder.findAnnotatedFields(AppResource.class));
        fields.addAll(testClassFinder.findAnnotatedFields(org.apache.openejb.junit.AppResource.class));
        for (final Field field : fields) {
            final Class<?> type = field.getType();
            if (AppModule.class.isAssignableFrom(type)) {
                field.setAccessible(true);
                field.set(inputTestInstance, appModule);
View Full Code Here

                    if (parent != null) {
                        urlSet = urlSet.exclude(parent);
                    }
                }
                ClassFinder finder = new ClassFinder(classLoader, urlSet.getUrls());
                for (Field field : finder.findAnnotatedFields(EJB.class)) {
                    EJB ejb = field.getAnnotation(EJB.class);
                    AnnotationDeployer.Member member = new AnnotationDeployer.FieldMember(field);
                    buildEjbRef(consumer, ejb, member);
                }
View Full Code Here

    }

    private void scan(Object target, String prefix) {
        ClassFinder finder = new ClassFinder(Classes.ancestors(target.getClass()));

        List<Field> fields = finder.findAnnotatedFields(Managed.class);
        for (Field field : fields) {
            attribute(new FieldMember(field, target, prefix));
        }

        List<Method> managed = finder.findAnnotatedMethods(Managed.class);
View Full Code Here

      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

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.