protected Type getResourceInjectionPointType(AnnotatedMember<?> member) { if (member instanceof AnnotatedField<?>) { return member.getBaseType(); } if (member instanceof AnnotatedMethod<?>) { AnnotatedMethod<?> method = (AnnotatedMethod<?>) member; if (method.getParameters().size() != 1) { throw UtilLogger.LOG.resourceSetterInjectionNotAJavabean(method); } return method.getParameters().get(0).getBaseType(); } throw new IllegalArgumentException("Unknown member " + member); }
protected Type getResourceInjectionPointType(AnnotatedMember<?> member) { if (member instanceof AnnotatedField<?>) { return member.getBaseType(); } if (member instanceof AnnotatedMethod<?>) { AnnotatedMethod<?> method = (AnnotatedMethod<?>) member; if (method.getParameters().size() != 1) { throw UtilLogger.LOG.resourceSetterInjectionNotAJavabean(method); } return method.getParameters().get(0).getBaseType(); } throw new IllegalArgumentException("Unknown member " + member); }
protected Type getResourceInjectionPointType(AnnotatedMember<?> member) { if (member instanceof AnnotatedField<?>) { return member.getBaseType(); } if (member instanceof AnnotatedMethod<?>) { AnnotatedMethod<?> method = (AnnotatedMethod<?>) member; if (method.getParameters().size() != 1) { throw UtilLogger.LOG.resourceSetterInjectionNotAJavabean(method); } return method.getParameters().get(0).getBaseType(); } throw new IllegalArgumentException("Unknown member " + member); }
protected Type getResourceInjectionPointType(AnnotatedMember<?> member) { if (member instanceof AnnotatedField<?>) { return member.getBaseType(); } if (member instanceof AnnotatedMethod<?>) { AnnotatedMethod<?> method = (AnnotatedMethod<?>) member; if (method.getParameters().size() != 1) { throw UtilLogger.LOG.resourceSetterInjectionNotAJavabean(method); } return method.getParameters().get(0).getBaseType(); } throw new IllegalArgumentException("Unknown member " + member); }
protected Type getResourceInjectionPointType(AnnotatedMember<?> member) { if (member instanceof AnnotatedField<?>) { return member.getBaseType(); } if (member instanceof AnnotatedMethod<?>) { AnnotatedMethod<?> method = (AnnotatedMethod<?>) member; if (method.getParameters().size() != 1) { throw UtilLogger.LOG.resourceSetterInjectionNotAJavabean(method); } return method.getParameters().get(0).getBaseType(); } throw new IllegalArgumentException("Unknown member " + member); }
protected Type getResourceInjectionPointType(AnnotatedMember<?> member) { if (member instanceof AnnotatedField<?>) { return member.getBaseType(); } if (member instanceof AnnotatedMethod<?>) { AnnotatedMethod<?> method = (AnnotatedMethod<?>) member; if (method.getParameters().size() != 1) { throw UtilLogger.LOG.resourceSetterInjectionNotAJavabean(method); } return method.getParameters().get(0).getBaseType(); } throw new IllegalArgumentException("Unknown member " + member); }
protected <T> Set<ResourceInjection<?>> createResourceInjections(Iterable<EnhancedAnnotatedField<?, ? super T>> fields, Iterable<EnhancedAnnotatedMethod<?, ? super T>> methods, Bean<?> declaringBean, Class<?> declaringClass, BeanManagerImpl manager) { ImmutableSet.Builder<ResourceInjection<?>> resourceInjections = ImmutableSet.builder(); S injectionServices = getInjectionServices(manager); C processorContext = getProcessorContext(manager); for (EnhancedAnnotatedField<?, ? super T> field : fields) { if (accept(field, processorContext)) { resourceInjections.add(createFieldResourceInjection( InjectionPointFactory.silentInstance().createFieldInjectionPoint(field, declaringBean, declaringClass, manager), injectionServices, processorContext)); } } for (EnhancedAnnotatedMethod<?, ?> method : methods) { if (method.getParameters().size() != 1) { throw UtilLogger.LOG.resourceSetterInjectionNotAJavabean(method); } if (accept(method, processorContext)) { EnhancedAnnotatedParameter<?, ?> parameter = method.getEnhancedParameters().get(0); resourceInjections.add(createSetterResourceInjection( InjectionPointFactory.silentInstance().createParameterInjectionPoint(parameter, declaringBean, declaringClass, manager), injectionServices, processorContext)); } } return resourceInjections.build(); }
protected <T> Set<ResourceInjection<?>> createResourceInjections(Iterable<EnhancedAnnotatedField<?, ? super T>> fields, Iterable<EnhancedAnnotatedMethod<?, ? super T>> methods, Bean<?> declaringBean, Class<?> declaringClass, BeanManagerImpl manager) { ImmutableSet.Builder<ResourceInjection<?>> resourceInjections = ImmutableSet.builder(); S injectionServices = getInjectionServices(manager); C processorContext = getProcessorContext(manager); for (EnhancedAnnotatedField<?, ? super T> field : fields) { if (accept(field, processorContext)) { resourceInjections.add(createFieldResourceInjection( InjectionPointFactory.silentInstance().createFieldInjectionPoint(field, declaringBean, declaringClass, manager), injectionServices, processorContext)); } } for (EnhancedAnnotatedMethod<?, ?> method : methods) { if (method.getParameters().size() != 1) { throw UtilLogger.LOG.resourceSetterInjectionNotAJavabean(method); } if (accept(method, processorContext)) { EnhancedAnnotatedParameter<?, ?> parameter = method.getEnhancedParameters().get(0); resourceInjections.add(createSetterResourceInjection( InjectionPointFactory.silentInstance().createParameterInjectionPoint(parameter, declaringBean, declaringClass, manager), injectionServices, processorContext)); } } return resourceInjections.build(); }
protected <T> Set<ResourceInjection<?>> createResourceInjections(Iterable<EnhancedAnnotatedField<?, ? super T>> fields, Iterable<EnhancedAnnotatedMethod<?, ? super T>> methods, Bean<?> declaringBean, Class<?> declaringClass, BeanManagerImpl manager) { ImmutableSet.Builder<ResourceInjection<?>> resourceInjections = ImmutableSet.builder(); S injectionServices = getInjectionServices(manager); C processorContext = getProcessorContext(manager); for (EnhancedAnnotatedField<?, ? super T> field : fields) { if (accept(field, processorContext)) { resourceInjections.add(createFieldResourceInjection( InjectionPointFactory.silentInstance().createFieldInjectionPoint(field, declaringBean, declaringClass, manager), injectionServices, processorContext)); } } for (EnhancedAnnotatedMethod<?, ?> method : methods) { if (method.getParameters().size() != 1) { throw UtilLogger.LOG.resourceSetterInjectionNotAJavabean(method); } if (accept(method, processorContext)) { EnhancedAnnotatedParameter<?, ?> parameter = method.getEnhancedParameters().get(0); resourceInjections.add(createSetterResourceInjection( InjectionPointFactory.silentInstance().createParameterInjectionPoint(parameter, declaringBean, declaringClass, manager), injectionServices, processorContext)); } } return resourceInjections.build(); }
protected <T> Set<ResourceInjection<?>> createResourceInjections(Iterable<EnhancedAnnotatedField<?, ? super T>> fields, Iterable<EnhancedAnnotatedMethod<?, ? super T>> methods, Bean<?> declaringBean, Class<?> declaringClass, BeanManagerImpl manager) { ImmutableSet.Builder<ResourceInjection<?>> resourceInjections = ImmutableSet.builder(); S injectionServices = getInjectionServices(manager); C processorContext = getProcessorContext(manager); for (EnhancedAnnotatedField<?, ? super T> field : fields) { if (accept(field, processorContext)) { resourceInjections.add(createFieldResourceInjection( InjectionPointFactory.silentInstance().createFieldInjectionPoint(field, declaringBean, declaringClass, manager), injectionServices, processorContext)); } } for (EnhancedAnnotatedMethod<?, ?> method : methods) { if (method.getParameters().size() != 1) { throw UtilLogger.LOG.resourceSetterInjectionNotAJavabean(method); } if (accept(method, processorContext)) { EnhancedAnnotatedParameter<?, ?> parameter = method.getEnhancedParameters().get(0); resourceInjections.add(createSetterResourceInjection( InjectionPointFactory.silentInstance().createParameterInjectionPoint(parameter, declaringBean, declaringClass, manager), injectionServices, processorContext)); } } return resourceInjections.build(); }
protected <T> Set<ResourceInjection<?>> createResourceInjections(Iterable<EnhancedAnnotatedField<?, ? super T>> fields, Iterable<EnhancedAnnotatedMethod<?, ? super T>> methods, Bean<?> declaringBean, Class<?> declaringClass, BeanManagerImpl manager) { ImmutableSet.Builder<ResourceInjection<?>> resourceInjections = ImmutableSet.builder(); S injectionServices = getInjectionServices(manager); C processorContext = getProcessorContext(manager); for (EnhancedAnnotatedField<?, ? super T> field : fields) { if (accept(field, processorContext)) { resourceInjections.add(createFieldResourceInjection( InjectionPointFactory.silentInstance().createFieldInjectionPoint(field, declaringBean, declaringClass, manager), injectionServices, processorContext)); } } for (EnhancedAnnotatedMethod<?, ?> method : methods) { if (method.getParameters().size() != 1) { throw UtilLogger.LOG.resourceSetterInjectionNotAJavabean(method); } if (accept(method, processorContext)) { EnhancedAnnotatedParameter<?, ?> parameter = method.getEnhancedParameters().get(0); resourceInjections.add(createSetterResourceInjection( InjectionPointFactory.silentInstance().createParameterInjectionPoint(parameter, declaringBean, declaringClass, manager), injectionServices, processorContext)); } } return resourceInjections.build(); }
throw UtilLogger.LOG.resourceSetterInjectionNotAJavabean(method);