public void visitMethod(Context annotation, Method method, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { Type type = helper.getGenericType(method); MethodInjectionSite site = new MethodInjectionSite(method, 0); visit(type, componentType, site, method.getDeclaringClass(), method, 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 visitMethod(Context annotation, Method method, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { Type type = helper.getGenericType(method); MethodInjectionSite site = new MethodInjectionSite(method, 0); visit(type, componentType, site, method.getDeclaringClass(), method, 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 visitMethod(PersistenceUnit annotation, Method method, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { MethodInjectionSite site = new MethodInjectionSite(method, 0); PersistenceUnitResourceReference definition = createDefinition(annotation); componentType.add(definition, site); }
public void visitMethod(PersistenceUnit annotation, Method method, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { MethodInjectionSite site = new MethodInjectionSite(method, 0); PersistenceUnitResourceReference definition = createDefinition(annotation); componentType.add(definition, site); }
public void visitMethod(PersistenceUnit annotation, Method method, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { MethodInjectionSite site = new MethodInjectionSite(method, 0); PersistenceUnitResourceReference definition = createDefinition(annotation); componentType.add(definition, site); // record that the implementation requires JPA componentType.addRequiredCapability("jpa"); }
void evaluateSetters(InjectingComponentType componentType, Class<?> implClass, IntrospectionContext context) { Map<InjectionSite, Injectable> sites = componentType.getInjectionSites(); TypeMapping typeMapping = context.getTypeMapping(implClass); Set<Method> setters = helper.getInjectionMethods(implClass, componentType.getServices().values()); for (Method setter : setters) { InjectionSite site = new MethodInjectionSite(setter, 0); // skip sites that have already been mapped if (sites.containsKey(site)) { continue; } String name = helper.getSiteName(setter, null); Type parameterType = setter.getGenericParameterTypes()[0]; Annotation[] annotations = setter.getAnnotations(); processSite(componentType, typeMapping, name, setter, parameterType, site, annotations, context); } }
public void visitMethod(Cache annotation, Method method, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { if (method.getParameterTypes().length != 1) { InvalidCacheSetter error = new InvalidCacheSetter("Setter must contain one parameter: " + method, method, componentType); context.addError(error); return; } String name = helper.getSiteName(method, null); MethodInjectionSite site = new MethodInjectionSite(method, 0); Class<?> type = method.getParameterTypes()[0]; ResourceReferenceDefinition definition = create(name, annotation, type, method, componentType, context); componentType.add(definition, site); }
public void visitMethod(PersistenceUnit annotation, Method method, Class<?> implClass, I implementation, IntrospectionContext context) { MethodInjectionSite site = new MethodInjectionSite(method, 0); PersistenceUnitResource definition = createDefinition(annotation); InjectingComponentType componentType = implementation.getComponentType(); componentType.add(definition, site); // record that the implementation requires JPA componentType.addRequiredCapability("jpa"); }
public void visitMethod(PersistenceContext annotation, Method method, Class<?> implClass, I implementation, IntrospectionContext context) { MethodInjectionSite site = new MethodInjectionSite(method, 0); InjectingComponentType componentType = implementation.getComponentType(); PersistenceContextResource definition = createDefinition(annotation, componentType); componentType.add(definition, site); // record that the implementation requires JPA componentType.addRequiredCapability("jpa"); }
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(org.fabric3.api.annotation.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); Producer<ComponentType> definition = createProducer(name, type, implClass, componentType, method, context); Class<?> clazz = method.getDeclaringClass(); processTargets(annotation, definition, method, clazz, 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 visitMethod(org.oasisopen.sca.annotation.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); Callback definition = createDefinition(name, type, implClass, componentType, 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); }
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); }