public void applyHeuristics(InjectingComponentType componentType, Class<?> implClass, IntrospectionContext context) { // if any properties, references or resources have been defined already assume that was what the user intended and return if (!(componentType.getProperties().isEmpty() && componentType.getReferences().isEmpty() && componentType.getResourceReferences().isEmpty())) { return; } evaluateConstructor(componentType, implClass, context); evaluateSetters(componentType, implClass, context); evaluateFields(componentType, implClass, context); }
for (Map.Entry<String, ResourceReference> entry : tempType.getResourceReferences().entrySet()) { String name = entry.getKey(); ResourceReference definition = componentType.getResourceReferences().get(name);
public void applyHeuristics(InjectingComponentType componentType, Class<?> implClass, IntrospectionContext context) { // apply service heuristic serviceHeuristic.applyHeuristics(componentType, implClass, context); if (componentType.getConstructor() == null) { Constructor<?> ctor = findConstructor(implClass, componentType, context); componentType.setConstructor(ctor); } if (componentType.getProperties().isEmpty() && componentType.getReferences().isEmpty() && componentType.getResourceReferences().isEmpty()) { evaluateConstructor(componentType, implClass, context); evaluateSetters(componentType, implClass, context); evaluateFields(componentType, implClass, context); } Scope scope = componentType.getScope(); if (componentType.isManaged() && !scope.isSingleton()) { IllegalManagementAttribute warning = new IllegalManagementAttribute(implClass, componentType); context.addWarning(warning); } }