@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final WrappedRequirement other = (WrappedRequirement) obj; if (m_host != other.m_host && (m_host == null || !m_host.equals(other.m_host))) { return false; } if (m_req != other.m_req && (m_req == null || !m_req.equals(other.m_req))) { return false; } return true; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final WrappedRequirement other = (WrappedRequirement) obj; if (m_host != other.m_host && (m_host == null || !m_host.equals(other.m_host))) { return false; } if (m_req != other.m_req && (m_req == null || !m_req.equals(other.m_req))) { return false; } return true; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final WrappedRequirement other = (WrappedRequirement) obj; if (m_host != other.m_host && (m_host == null || !m_host.equals(other.m_host))) { return false; } if (m_req != other.m_req && (m_req == null || !m_req.equals(other.m_req))) { return false; } return true; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final WrappedRequirement other = (WrappedRequirement) obj; if (m_host != other.m_host && (m_host == null || !m_host.equals(other.m_host))) { return false; } if (m_req != other.m_req && (m_req == null || !m_req.equals(other.m_req))) { return false; } return true; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final WrappedRequirement other = (WrappedRequirement) obj; if (m_host != other.m_host && (m_host == null || !m_host.equals(other.m_host))) { return false; } if (m_req != other.m_req && (m_req == null || !m_req.equals(other.m_req))) { return false; } return true; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final WrappedRequirement other = (WrappedRequirement) obj; if (m_host != other.m_host && (m_host == null || !m_host.equals(other.m_host))) { return false; } if (m_req != other.m_req && (m_req == null || !m_req.equals(other.m_req))) { return false; } return true; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final WrappedRequirement other = (WrappedRequirement) obj; if (m_host != other.m_host && (m_host == null || !m_host.equals(other.m_host))) { return false; } if (m_req != other.m_req && (m_req == null || !m_req.equals(other.m_req))) { return false; } return true; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final WrappedRequirement other = (WrappedRequirement) obj; if (m_host != other.m_host && (m_host == null || !m_host.equals(other.m_host))) { return false; } if (m_req != other.m_req && (m_req == null || !m_req.equals(other.m_req))) { return false; } return true; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final WrappedRequirement other = (WrappedRequirement) obj; if (m_host != other.m_host && (m_host == null || !m_host.equals(other.m_host))) { return false; } if (m_req != other.m_req && (m_req == null || !m_req.equals(other.m_req))) { return false; } return true; }
private void addWiredBundle(Map<Resource, List<Wire>> wirings, Resource resource, List<Resource> result) { List<Requirement> reqs = resource.getRequirements(BUNDLE_NAMESPACE); for (Requirement req : reqs) { List<Wire> wrs = wirings.get(resource); for (Wire w : wrs) { if (w.getRequirement() .equals(req)) { Resource res = w.getProvider(); if (res != null) { if (!result.contains(res)) { result.add(res); addWiredBundle(wirings, res, result); } } } } } }
private void addWiredBundle(Map<Resource, List<Wire>> wirings, Resource resource, List<Resource> result) { List<Requirement> reqs = resource.getRequirements(BUNDLE_NAMESPACE); for (Requirement req : reqs) { List<Wire> wrs = wirings.get(resource); for (Wire w : wrs) { if (w.getRequirement() .equals(req)) { Resource res = w.getProvider(); if (res != null) { if (!result.contains(res)) { result.add(res); addWiredBundle(wirings, res, result); } } } } } }
private Capability getSatisfyingCapability(Requirement req) { // If the requiring revision is not resolved, then check in the // candidate map for its matching candidate. Capability cap = m_allCandidates.getFirstCandidate(req); // Otherwise, if the requiring revision is resolved then check // in its wires for the capability satisfying the requirement. if (cap == null && m_context.getWirings().containsKey(req.getResource())) { List<Wire> wires = m_context.getWirings().get(req.getResource()).getRequiredResourceWires(null); req = getDeclaredRequirement(req); for (Wire w : wires) { if (w.getRequirement().equals(req)) { // TODO: RESOLVER - This is not 100% correct, since requirements for // dynamic imports with wildcards will reside on many wires and // this code only finds the first one, not necessarily the correct // one. This is only used for the diagnostic message, but it still // could confuse the user. cap = w.getCapability(); break; } } } return cap; }
private Capability getSatisfyingCapability(Requirement req) { // If the requiring revision is not resolved, then check in the // candidate map for its matching candidate. Capability cap = m_allCandidates.getFirstCandidate(req); // Otherwise, if the requiring revision is resolved then check // in its wires for the capability satisfying the requirement. if (cap == null && m_context.getWirings().containsKey(req.getResource())) { List<Wire> wires = m_context.getWirings().get(req.getResource()).getRequiredResourceWires(null); req = getDeclaredRequirement(req); for (Wire w : wires) { if (w.getRequirement().equals(req)) { // TODO: RESOLVER - This is not 100% correct, since requirements for // dynamic imports with wildcards will reside on many wires and // this code only finds the first one, not necessarily the correct // one. This is only used for the diagnostic message, but it still // could confuse the user. cap = w.getCapability(); break; } } } return cap; } }
private Capability getSatisfyingCapability(Requirement req) { // If the requiring revision is not resolved, then check in the // candidate map for its matching candidate. Capability cap = m_allCandidates.getFirstCandidate(req); // Otherwise, if the requiring revision is resolved then check // in its wires for the capability satisfying the requirement. if (cap == null && m_context.getWirings().containsKey(req.getResource())) { List<Wire> wires = m_context.getWirings().get(req.getResource()).getRequiredResourceWires(null); req = getDeclaredRequirement(req); for (Wire w : wires) { if (w.getRequirement().equals(req)) { // TODO: RESOLVER - This is not 100% correct, since requirements for // dynamic imports with wildcards will reside on many wires and // this code only finds the first one, not necessarily the correct // one. This is only used for the diagnostic message, but it still // could confuse the user. cap = w.getCapability(); break; } } } return cap; } }
private Capability getSatisfyingCapability(Requirement req) { // If the requiring revision is not resolved, then check in the // candidate map for its matching candidate. Capability cap = m_allCandidates.getFirstCandidate(req); // Otherwise, if the requiring revision is resolved then check // in its wires for the capability satisfying the requirement. if (cap == null && m_context.getWirings().containsKey(req.getResource())) { List<Wire> wires = m_context.getWirings().get(req.getResource()).getRequiredResourceWires(null); req = getDeclaredRequirement(req); for (Wire w : wires) { if (w.getRequirement().equals(req)) { // TODO: RESOLVER - This is not 100% correct, since requirements for // dynamic imports with wildcards will reside on many wires and // this code only finds the first one, not necessarily the correct // one. This is only used for the diagnostic message, but it still // could confuse the user. cap = w.getCapability(); break; } } } return cap; }
private Capability getSatisfyingCapability(Requirement req) { // If the requiring revision is not resolved, then check in the // candidate map for its matching candidate. Capability cap = m_allCandidates.getFirstCandidate(req); // Otherwise, if the requiring revision is resolved then check // in its wires for the capability satisfying the requirement. if (cap == null && m_context.getWirings().containsKey(req.getResource())) { List<Wire> wires = m_context.getWirings().get(req.getResource()).getRequiredResourceWires(null); req = getDeclaredRequirement(req); for (Wire w : wires) { if (w.getRequirement().equals(req)) { // TODO: RESOLVER - This is not 100% correct, since requirements for // dynamic imports with wildcards will reside on many wires and // this code only finds the first one, not necessarily the correct // one. This is only used for the diagnostic message, but it still // could confuse the user. cap = w.getCapability(); break; } } } return cap; }
private Capability getSatisfyingCapability(Requirement req) { // If the requiring revision is not resolved, then check in the // candidate map for its matching candidate. Capability cap = m_allCandidates.getFirstCandidate(req); // Otherwise, if the requiring revision is resolved then check // in its wires for the capability satisfying the requirement. if (cap == null && m_context.getWirings().containsKey(req.getResource())) { List<Wire> wires = m_context.getWirings().get(req.getResource()).getRequiredResourceWires(null); req = getDeclaredRequirement(req); for (Wire w : wires) { if (w.getRequirement().equals(req)) { // TODO: RESOLVER - This is not 100% correct, since requirements for // dynamic imports with wildcards will reside on many wires and // this code only finds the first one, not necessarily the correct // one. This is only used for the diagnostic message, but it still // could confuse the user. cap = w.getCapability(); break; } } } return cap; }
for (Wire w : wires) if (w.getRequirement().equals(req))
@Override public boolean equals(Object obj) { if (obj == this) return true; if (obj instanceof Wire) { Wire w = (Wire) obj; if (capability.equals(w.getCapability()) && requirement.equals(w.getRequirement())) { Resource provider = getProvider(); Resource requirer = getRequirer(); return (provider == null ? w.getProvider() == null : provider.equals(w.getProvider())) && (requirer == null ? w.getRequirer() == null : requirer.equals(w.getRequirer())); } } return false; }
@Override public boolean equals(Object obj) { if (obj == this) return true; if (obj instanceof Wire) { Wire w = (Wire) obj; if (capability.equals(w.getCapability()) && requirement.equals(w.getRequirement())) { Resource provider = getProvider(); Resource requirer = getRequirer(); return (provider == null ? w.getProvider() == null : provider.equals(w.getProvider())) && (requirer == null ? w.getRequirer() == null : requirer.equals(w.getRequirer())); } } return false; }