public Collection<EnhancedAnnotatedField<?, ? super T>> getEnhancedFields() { return delegate().getEnhancedFields(); }
public Collection<EnhancedAnnotatedField<?, ?>> getEnhancedFields(Class<? extends Annotation> annotationType) { return delegate().getEnhancedFields(annotationType); }
public Collection<EnhancedAnnotatedField<?, ? super T>> getEnhancedFields() { return delegate().getEnhancedFields(); }
public Collection<EnhancedAnnotatedField<?, ?>> getEnhancedFields(Class<? extends Annotation> annotationType) { return delegate().getEnhancedFields(annotationType); }
/** * Gets the abstracted field annotated with a specific annotation type * <p/> * If the fields map is null, initialize it first * * @param annotationType The annotation type to match * @return A set of matching abstracted fields, null if none are found. */ @Override public Collection<EnhancedAnnotatedField<?, ?>> getEnhancedFields(Class<? extends Annotation> annotationType) { if (annotatedFields == null) { // Build collection from class hierarchy ArrayList<EnhancedAnnotatedField<?, ?>> aggregatedFields = new ArrayList<EnhancedAnnotatedField<?, ?>>(this.declaredAnnotatedFields.get(annotationType)); if ((superclass != null) && (superclass.getJavaClass() != Object.class)) { aggregatedFields.addAll(superclass.getEnhancedFields(annotationType)); } return Collections.unmodifiableCollection(aggregatedFields); } else { // Return results collected directly from AnnotatedType return annotatedFields.get(annotationType); } }
/** * Gets the abstracted field annotated with a specific annotation type * <p/> * If the fields map is null, initialize it first * * @param annotationType The annotation type to match * @return A set of matching abstracted fields, null if none are found. */ @Override public Collection<EnhancedAnnotatedField<?, ?>> getEnhancedFields(Class<? extends Annotation> annotationType) { if (annotatedFields == null) { // Build collection from class hierarchy ArrayList<EnhancedAnnotatedField<?, ?>> aggregatedFields = new ArrayList<EnhancedAnnotatedField<?, ?>>(this.declaredAnnotatedFields.get(annotationType)); if ((superclass != null) && (superclass.getJavaClass() != Object.class)) { aggregatedFields.addAll(superclass.getEnhancedFields(annotationType)); } return Collections.unmodifiableCollection(aggregatedFields); } else { // Return results collected directly from AnnotatedType return annotatedFields.get(annotationType); } }
/** * Gets the abstracted field annotated with a specific annotation type * <p/> * If the fields map is null, initialize it first * * @param annotationType The annotation type to match * @return A set of matching abstracted fields, null if none are found. */ @Override public Collection<EnhancedAnnotatedField<?, ?>> getEnhancedFields(Class<? extends Annotation> annotationType) { if (annotatedFields == null) { // Build collection from class hierarchy ArrayList<EnhancedAnnotatedField<?, ?>> aggregatedFields = new ArrayList<EnhancedAnnotatedField<?, ?>>(this.declaredAnnotatedFields.get(annotationType)); if ((superclass != null) && (superclass.getJavaClass() != Object.class)) { aggregatedFields.addAll(superclass.getEnhancedFields(annotationType)); } return Collections.unmodifiableCollection(aggregatedFields); } else { // Return results collected directly from AnnotatedType return annotatedFields.get(annotationType); } }
/** * Gets the abstracted field annotated with a specific annotation type * <p/> * If the fields map is null, initialize it first * * @param annotationType The annotation type to match * @return A set of matching abstracted fields, null if none are found. */ @Override public Collection<EnhancedAnnotatedField<?, ?>> getEnhancedFields(Class<? extends Annotation> annotationType) { if (annotatedFields == null) { // Build collection from class hierarchy ArrayList<EnhancedAnnotatedField<?, ?>> aggregatedFields = new ArrayList<EnhancedAnnotatedField<?, ?>>(this.declaredAnnotatedFields.get(annotationType)); if ((superclass != null) && (superclass.getJavaClass() != Object.class)) { aggregatedFields.addAll(superclass.getEnhancedFields(annotationType)); } return Collections.unmodifiableCollection(aggregatedFields); } else { // Return results collected directly from AnnotatedType return annotatedFields.get(annotationType); } }
/** * Gets the abstracted field annotated with a specific annotation type * <p/> * If the fields map is null, initialize it first * * @param annotationType The annotation type to match * @return A set of matching abstracted fields, null if none are found. */ @Override public Collection<EnhancedAnnotatedField<?, ?>> getEnhancedFields(Class<? extends Annotation> annotationType) { if (annotatedFields == null) { // Build collection from class hierarchy ArrayList<EnhancedAnnotatedField<?, ?>> aggregatedFields = new ArrayList<EnhancedAnnotatedField<?, ?>>(this.declaredAnnotatedFields.get(annotationType)); if ((superclass != null) && (superclass.getJavaClass() != Object.class)) { aggregatedFields.addAll(superclass.getEnhancedFields(annotationType)); } return Collections.unmodifiableCollection(aggregatedFields); } else { // Return results collected directly from AnnotatedType return annotatedFields.get(annotationType); } }
/** * Gets the abstracted field annotated with a specific annotation type * <p/> * If the fields map is null, initialize it first * * @param annotationType The annotation type to match * @return A set of matching abstracted fields, null if none are found. */ @Override public Collection<EnhancedAnnotatedField<?, ?>> getEnhancedFields(Class<? extends Annotation> annotationType) { if (annotatedFields == null) { // Build collection from class hierarchy ArrayList<EnhancedAnnotatedField<?, ?>> aggregatedFields = new ArrayList<EnhancedAnnotatedField<?, ?>>(this.declaredAnnotatedFields.get(annotationType)); if ((superclass != null) && (superclass.getJavaClass() != Object.class)) { aggregatedFields.addAll(superclass.getEnhancedFields(annotationType)); } return Collections.unmodifiableCollection(aggregatedFields); } else { // Return results collected directly from AnnotatedType return annotatedFields.get(annotationType); } }
@Override protected void checkBeanImplementation() { super.checkBeanImplementation(); if (isNormalScoped()) { for (EnhancedAnnotatedField<?, ?> field : getEnhancedAnnotated().getEnhancedFields()) { if (field.isPublic() && !field.isStatic()) { throw BeanLogger.LOG.publicFieldOnNormalScopedBeanNotAllowed(field); } } } }
@Override protected void checkBeanImplementation() { super.checkBeanImplementation(); if (isNormalScoped()) { for (EnhancedAnnotatedField<?, ?> field : getEnhancedAnnotated().getEnhancedFields()) { if (field.isPublic() && !field.isStatic()) { throw BeanLogger.LOG.publicFieldOnNormalScopedBeanNotAllowed(field); } } } }
@Override protected void checkBeanImplementation() { super.checkBeanImplementation(); if (isNormalScoped()) { for (EnhancedAnnotatedField<?, ?> field : getEnhancedAnnotated().getEnhancedFields()) { if (field.isPublic() && !field.isStatic()) { throw BeanLogger.LOG.publicFieldOnNormalScopedBeanNotAllowed(field); } } } }
@Override protected void checkBeanImplementation() { super.checkBeanImplementation(); if (isNormalScoped()) { for (EnhancedAnnotatedField<?, ?> field : getEnhancedAnnotated().getEnhancedFields()) { if (field.isPublic() && !field.isStatic()) { throw BeanLogger.LOG.publicFieldOnNormalScopedBeanNotAllowed(field); } } } }
@Override protected void checkBeanImplementation() { super.checkBeanImplementation(); if (isNormalScoped()) { for (EnhancedAnnotatedField<?, ?> field : getEnhancedAnnotated().getEnhancedFields()) { if (field.isPublic() && !field.isStatic()) { throw BeanLogger.LOG.publicFieldOnNormalScopedBeanNotAllowed(field); } } } }
@Override protected void checkBeanImplementation() { super.checkBeanImplementation(); if (isNormalScoped()) { for (EnhancedAnnotatedField<?, ?> field : getEnhancedAnnotated().getEnhancedFields()) { if (field.isPublic() && !field.isStatic()) { throw BeanLogger.LOG.publicFieldOnNormalScopedBeanNotAllowed(field); } } } }
public List<Set<FieldInjectionPoint<?, ?>>> getFieldInjectionPoints(Bean<?> declaringBean, EnhancedAnnotatedType<?> type, BeanManagerImpl manager) { List<Set<FieldInjectionPoint<?, ?>>> injectableFieldsList = new ArrayList<Set<FieldInjectionPoint<?, ?>>>(); if (type.slim() instanceof UnbackedAnnotatedType<?>) { // external AnnotatedTypes require special treatment Collection<EnhancedAnnotatedField<?, ?>> allFields = type.getEnhancedFields(Inject.class); for (Class<?> clazz = type.getJavaClass(); clazz != null && clazz != Object.class; clazz = clazz.getSuperclass()) { ImmutableSet.Builder<FieldInjectionPoint<?, ?>> fields = ImmutableSet.builder(); for (EnhancedAnnotatedField<?, ?> field : allFields) { if (!field.isStatic() && field.getJavaMember().getDeclaringClass().equals(clazz)) { addFieldInjectionPoint(field, fields, declaringBean, type.getJavaClass(), manager); } } injectableFieldsList.add(0, fields.build()); } } else { for (EnhancedAnnotatedType<?> t = type; t != null && !t.getJavaClass().equals(Object.class); t = t .getEnhancedSuperclass()) { ImmutableSet.Builder<FieldInjectionPoint<?, ?>> fields = ImmutableSet.builder(); for (EnhancedAnnotatedField<?, ?> annotatedField : t.getDeclaredEnhancedFields(Inject.class)) { if (!annotatedField.isStatic()) { addFieldInjectionPoint(annotatedField, fields, declaringBean, t.getJavaClass(), manager); } } injectableFieldsList.add(0, fields.build()); } } return ImmutableList.copyOf(injectableFieldsList); }
public List<Set<FieldInjectionPoint<?, ?>>> getFieldInjectionPoints(Bean<?> declaringBean, EnhancedAnnotatedType<?> type, BeanManagerImpl manager) { List<Set<FieldInjectionPoint<?, ?>>> injectableFieldsList = new ArrayList<Set<FieldInjectionPoint<?, ?>>>(); if (type.slim() instanceof UnbackedAnnotatedType<?>) { // external AnnotatedTypes require special treatment Collection<EnhancedAnnotatedField<?, ?>> allFields = type.getEnhancedFields(Inject.class); for (Class<?> clazz = type.getJavaClass(); clazz != null && clazz != Object.class; clazz = clazz.getSuperclass()) { ImmutableSet.Builder<FieldInjectionPoint<?, ?>> fields = ImmutableSet.builder(); for (EnhancedAnnotatedField<?, ?> field : allFields) { if (!field.isStatic() && field.getJavaMember().getDeclaringClass().equals(clazz)) { addFieldInjectionPoint(field, fields, declaringBean, type.getJavaClass(), manager); } } injectableFieldsList.add(0, fields.build()); } } else { for (EnhancedAnnotatedType<?> t = type; t != null && !t.getJavaClass().equals(Object.class); t = t .getEnhancedSuperclass()) { ImmutableSet.Builder<FieldInjectionPoint<?, ?>> fields = ImmutableSet.builder(); for (EnhancedAnnotatedField<?, ?> annotatedField : t.getDeclaredEnhancedFields(Inject.class)) { if (!annotatedField.isStatic()) { addFieldInjectionPoint(annotatedField, fields, declaringBean, t.getJavaClass(), manager); } } injectableFieldsList.add(0, fields.build()); } } return ImmutableList.copyOf(injectableFieldsList); }
public List<Set<FieldInjectionPoint<?, ?>>> getFieldInjectionPoints(Bean<?> declaringBean, EnhancedAnnotatedType<?> type, BeanManagerImpl manager) { List<Set<FieldInjectionPoint<?, ?>>> injectableFieldsList = new ArrayList<Set<FieldInjectionPoint<?, ?>>>(); if (type.slim() instanceof UnbackedAnnotatedType<?>) { // external AnnotatedTypes require special treatment Collection<EnhancedAnnotatedField<?, ?>> allFields = type.getEnhancedFields(Inject.class); for (Class<?> clazz = type.getJavaClass(); clazz != null && clazz != Object.class; clazz = clazz.getSuperclass()) { ImmutableSet.Builder<FieldInjectionPoint<?, ?>> fields = ImmutableSet.builder(); for (EnhancedAnnotatedField<?, ?> field : allFields) { if (!field.isStatic() && field.getJavaMember().getDeclaringClass().equals(clazz)) { addFieldInjectionPoint(field, fields, declaringBean, type.getJavaClass(), manager); } } injectableFieldsList.add(0, fields.build()); } } else { for (EnhancedAnnotatedType<?> t = type; t != null && !t.getJavaClass().equals(Object.class); t = t .getEnhancedSuperclass()) { ImmutableSet.Builder<FieldInjectionPoint<?, ?>> fields = ImmutableSet.builder(); for (EnhancedAnnotatedField<?, ?> annotatedField : t.getDeclaredEnhancedFields(Inject.class)) { if (!annotatedField.isStatic()) { addFieldInjectionPoint(annotatedField, fields, declaringBean, t.getJavaClass(), manager); } } injectableFieldsList.add(0, fields.build()); } } return immutableListView(injectableFieldsList); }
public List<Set<FieldInjectionPoint<?, ?>>> getFieldInjectionPoints(Bean<?> declaringBean, EnhancedAnnotatedType<?> type, BeanManagerImpl manager) { List<Set<FieldInjectionPoint<?, ?>>> injectableFieldsList = new ArrayList<Set<FieldInjectionPoint<?, ?>>>(); if (type.slim() instanceof UnbackedAnnotatedType<?>) { // external AnnotatedTypes require special treatment Collection<EnhancedAnnotatedField<?, ?>> allFields = type.getEnhancedFields(Inject.class); for (Class<?> clazz = type.getJavaClass(); clazz != null && clazz != Object.class; clazz = clazz.getSuperclass()) { ImmutableSet.Builder<FieldInjectionPoint<?, ?>> fields = ImmutableSet.builder(); for (EnhancedAnnotatedField<?, ?> field : allFields) { if (!field.isStatic() && field.getJavaMember().getDeclaringClass().equals(clazz)) { addFieldInjectionPoint(field, fields, declaringBean, type.getJavaClass(), manager); } } injectableFieldsList.add(0, fields.build()); } } else { for (EnhancedAnnotatedType<?> t = type; t != null && !t.getJavaClass().equals(Object.class); t = t .getEnhancedSuperclass()) { ImmutableSet.Builder<FieldInjectionPoint<?, ?>> fields = ImmutableSet.builder(); for (EnhancedAnnotatedField<?, ?> annotatedField : t.getDeclaredEnhancedFields(Inject.class)) { if (!annotatedField.isStatic()) { addFieldInjectionPoint(annotatedField, fields, declaringBean, t.getJavaClass(), manager); } } injectableFieldsList.add(0, fields.build()); } } return ImmutableList.copyOf(injectableFieldsList); }