Examples of findAnnotatedFields()


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

      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

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

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

      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

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

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

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

    }

    private void scan(Object target, String prefix) {
        ClassFinder finder = new ClassFinder(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

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

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

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

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