public void visitField(Binding annotation, Field field, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { if (field.isAnnotationPresent(Reference.class)) { return; } String name = helper.getSiteName(field, ""); if (componentType.getReferences().containsKey(name)) { // reference already introspected, e.g. repeatable annotations return; } referenceProcessor.addDefinition(field, "", true, implClass, componentType, context); } }
public void visitField(Channel annotation, Field field, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { FieldInjectionSite site = new FieldInjectionSite(field); String name = helper.getSiteName(field, null); Class<?> type = field.getType(); createReference(name, annotation, type, componentType, site, implClass, context); }
public void visitMethod(Channel annotation, Method method, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { MethodInjectionSite site = new MethodInjectionSite(method, 0); String name = helper.getSiteName(method, null); Class<?> type = method.getParameterTypes()[0]; createReference(name, annotation, type, componentType, site, implClass, context); }
public void visitField(Channel annotation, Field field, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { FieldInjectionSite site = new FieldInjectionSite(field); String name = helper.getSiteName(field, null); Class<?> type = field.getType(); createReference(name, annotation, type, componentType, site, implClass, context); }
public void visitConstructorParameter(Channel annotation, Constructor<?> constructor, int index, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { ConstructorInjectionSite site = new ConstructorInjectionSite(constructor, index); String name = helper.getSiteName(constructor, index, null); Class<?> type = constructor.getParameterTypes()[index]; createReference(name, annotation, type, componentType, site, implClass, context); }
public void addDefinition(Field field, String name, boolean required, Class<?> clazz, InjectingComponentType componentType, IntrospectionContext context) { name = helper.getSiteName(field, name); Type type = field.getGenericType(); FieldInjectionSite site = new FieldInjectionSite(field); Reference<ComponentType> definition = createDefinition(name, required, type, clazz, componentType, context); componentType.add(definition, site); addTargets(field, field, context, definition); }
public void visitField(Callback annotation, Field field, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { validate(field, componentType, context); String name = helper.getSiteName(field, null); Type type = field.getGenericType(); FieldInjectionSite site = new FieldInjectionSite(field); CallbackDefinition definition = createDefinition(name, type, implClass, componentType, context); componentType.add(definition, site); }
public void visitField(PersistenceContext annotation, Field field, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { FieldInjectionSite site = new FieldInjectionSite(field); String name = helper.getSiteName(field, null); if (EntityManager.class.equals(field.getType())) { PersistenceContextResourceReference reference = createReference(name, field, annotation, componentType, context); componentType.add(reference, site); } else { HibernateSessionResourceReference reference = createSessionReference(name, annotation, componentType); componentType.add(reference, site); } }
public void visitField(Producer annotation, Field field, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { String name = helper.getSiteName(field, annotation.value()); Type type = field.getGenericType(); FieldInjectionSite site = new FieldInjectionSite(field); ProducerDefinition definition = createDefinition(name, type, implClass, componentType, field, context); componentType.add(definition, site); }
public void visitField(PersistenceContext annotation, Field field, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { FieldInjectionSite site = new FieldInjectionSite(field); String name = helper.getSiteName(field, null); if (EntityManager.class.equals(field.getType())) { PersistenceContextResourceReference reference = createReference(name, field, annotation, componentType, context); componentType.add(reference, site); } else { HibernateSessionResourceReference reference = createSessionReference(name, annotation, componentType); componentType.add(reference, site); } }
public void visitField(Monitor annotation, Field field, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { String name = helper.getSiteName(field, null); Type genericType = field.getGenericType(); TypeMapping typeMapping = context.getTypeMapping(implClass); Class<?> type = helper.getBaseType(genericType, typeMapping); FieldInjectionSite site = new FieldInjectionSite(field); MonitorResourceReference resource = createDefinition(name, annotation, type, componentType, context); componentType.add(resource, site); }
public void visitField(Monitor annotation, Field field, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { String name = helper.getSiteName(field, null); Type genericType = field.getGenericType(); TypeMapping typeMapping = context.getTypeMapping(implClass); Class<?> type = helper.getBaseType(genericType, typeMapping); FieldInjectionSite site = new FieldInjectionSite(field); MonitorResourceReference resource = createDefinition(name, annotation, type, componentType, context); componentType.add(resource, site); }
public void visitField(Monitor annotation, Field field, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { String name = helper.getSiteName(field, null); Type genericType = field.getGenericType(); TypeMapping typeMapping = context.getTypeMapping(implClass); Class<?> type = helper.getBaseType(genericType, typeMapping); FieldInjectionSite site = new FieldInjectionSite(field); MonitorResourceReference resource = createDefinition(name, annotation, type, componentType, context); componentType.add(resource, site); }
public void visitMethod(Reference annotation, Method method, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { String name = helper.getSiteName(method, annotation.name()); Type type = helper.getGenericType(method); MethodInjectionSite site = new MethodInjectionSite(method, 0); Annotation[] annotations = method.getAnnotations(); ReferenceDefinition definition = createDefinition(name, annotation.required(), type, implClass, annotations, componentType, context); componentType.add(definition, site); }
public void visitMethod(Callback annotation, Method method, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { validate(method, componentType, context); String name = helper.getSiteName(method, null); Type type = helper.getGenericType(method); MethodInjectionSite site = new MethodInjectionSite(method, 0); CallbackDefinition definition = createDefinition(name, type, implClass, componentType, context); componentType.add(definition, site); }
public void addDefinition(Method method, String name, boolean required, Class<?> clazz, InjectingComponentType componentType, IntrospectionContext context) { name = helper.getSiteName(method, name); Type type = helper.getGenericType(method); MethodInjectionSite site = new MethodInjectionSite(method, 0); Reference<ComponentType> definition = createDefinition(name, required, type, clazz, componentType, context); addTargets(method, method, context, definition); componentType.add(definition, site); }
public void visitMethod(Producer annotation, Method method, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { String name = helper.getSiteName(method, annotation.value()); Type type = helper.getGenericType(method); MethodInjectionSite site = new MethodInjectionSite(method, 0); ProducerDefinition definition = createDefinition(name, type, implClass, componentType, method, context); componentType.add(definition, site); }
public void visitConstructorParameter(Producer annotation, Constructor<?> constructor, int index, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { String name = helper.getSiteName(constructor, index, annotation.value()); Type type = helper.getGenericType(constructor, index); ConstructorInjectionSite site = new ConstructorInjectionSite(constructor, index); ProducerDefinition definition = createDefinition(name, type, implClass, componentType, constructor, context); componentType.add(definition, site); }
public void visitMethod(Monitor annotation, Method method, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { String name = helper.getSiteName(method, null); TypeMapping typeMapping = context.getTypeMapping(implClass); Type genericType = helper.getGenericType(method); Class<?> type = helper.getBaseType(genericType, typeMapping); MethodInjectionSite site = new MethodInjectionSite(method, 0); MonitorResourceReference resource = createDefinition(name, annotation, type, componentType, context); componentType.add(resource, site); }
public void visitMethod(Monitor annotation, Method method, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { String name = helper.getSiteName(method, null); TypeMapping typeMapping = context.getTypeMapping(implClass); Type genericType = helper.getGenericType(method); Class<?> type = helper.getBaseType(genericType, typeMapping); MethodInjectionSite site = new MethodInjectionSite(method, 0); MonitorResourceReference resource = createDefinition(name, annotation, type, componentType, context); componentType.add(resource, site); }