Package org.apache.xbean.finder

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


    }

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

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

        final List<Method> managed = finder.findAnnotatedMethods(Managed.class);
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

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.