private void instantiateReferenceWires(LogicalReference reference, InstantiationContext context) { LogicalCompositeComponent parent = reference.getParent().getParent(); Reference componentReference = reference.getComponentReference(); Reference<ComponentType> definition = reference.getDefinition(); if (componentReference == null && definition.getTargets().isEmpty()) { // the reference is not configured on the component definition in the composite or in the component type so there are no wires return; } List<Target> serviceTargets = componentReference != null ? componentReference.getTargets() : definition.getTargets(); if (serviceTargets.isEmpty()) { serviceTargets = definition.getTargets(); } if (serviceTargets.isEmpty()) { // no targets are specified return; } List<LogicalWire> wires = new ArrayList<>(); // resolve the reference targets and create logical wires for (Target target : serviceTargets) { LogicalWire wire = createWire(target, reference, null, parent, context); if (wire == null) { continue; } wires.add(wire); } if (!wires.isEmpty()) { parent.addWires(reference, wires); } reference.setResolved(true); }
private void instantiateReferenceWires(LogicalReference reference, InstantiationContext context) { LogicalCompositeComponent parent = reference.getParent().getParent(); Reference componentReference = reference.getComponentReference(); Reference<ComponentType> definition = reference.getDefinition(); if (componentReference == null && definition.getTargets().isEmpty()) { // the reference is not configured on the component definition in the composite or in the component type so there are no wires return; } List<Target> serviceTargets = componentReference != null ? componentReference.getTargets() : definition.getTargets(); if (serviceTargets.isEmpty()) { serviceTargets = definition.getTargets(); } if (serviceTargets.isEmpty()) { // no targets are specified return; } List<LogicalWire> wires = new ArrayList<>(); // resolve the reference targets and create logical wires for (Target target : serviceTargets) { LogicalWire wire = createWire(target, reference, null, parent, context); if (wire == null) { continue; } wires.add(wire); } if (!wires.isEmpty()) { parent.addWires(reference, wires); } reference.setResolved(true); }
private void instantiateReferenceWires(LogicalReference reference, InstantiationContext context) { LogicalCompositeComponent parent = reference.getParent().getParent(); ComponentReference componentReference = reference.getComponentReference(); if (componentReference == null) {
private void resolveReference(LogicalReference logicalReference, LogicalCompositeComponent compositeComponent, InstantiationContext context) { Reference<Component> componentReference = logicalReference.getComponentReference(); LogicalComponent<?> component = logicalReference.getParent();
private void resolveReference(LogicalReference logicalReference, LogicalCompositeComponent compositeComponent, InstantiationContext context) { Reference<Component> componentReference = logicalReference.getComponentReference(); LogicalComponent<?> component = logicalReference.getParent();
|| !reference.getBindings().isEmpty() || reference.getAutowire() == Autowire.ON || reference.getComponentReference() != null) { // Reference should not be configured in the component.
private void resolve(LogicalReference logicalReference, LogicalCompositeComponent compositeComponent, InstantiationContext context) { ComponentReference componentReference = logicalReference.getComponentReference(); LogicalComponent<?> component = logicalReference.getParent();