public boolean equals(Object o) { if (!(o instanceof InjectionTarget)) { return false; } else { // Note that from xml, one only have className and targetName. // From annotation processing, one may define methodName, // fieldName and a different metadataSource. // Since an applicient container also does annotation processing // itself, one would like to avoid duplication from xml and // annotation processing. // So, one will only check className and targetName here. InjectionTarget injTarget = (InjectionTarget)o; return equals(className, injTarget.className) && equals(targetName, injTarget.targetName); } }
public boolean equals(Object o) { if (!(o instanceof InjectionTarget)) { return false; } else { // Note that from xml, one only have className and targetName. // From annotation processing, one may define methodName, // fieldName and a different metadataSource. // Since an applicient container also does annotation processing // itself, one would like to avoid duplication from xml and // annotation processing. // So, one will only check className and targetName here. InjectionTarget injTarget = (InjectionTarget)o; return equals(className, injTarget.className) && equals(targetName, injTarget.targetName); } }
public void addInjectionTarget(InjectionTarget target) { if (injectionTargets==null) { injectionTargets = new HashSet<InjectionTarget>(); } boolean found = false; for (InjectionTarget injTarget : injectionTargets) { if (injTarget.equals(target)) { found = true; break; } } if (!found) { injectionTargets.add(target); } }
public void addInjectionTarget(InjectionTarget target) { if (injectionTargets==null) { injectionTargets = new HashSet<InjectionTarget>(); } boolean found = false; for (InjectionTarget injTarget : injectionTargets) { if (injTarget.equals(target)) { found = true; break; } } if (!found) { injectionTargets.add(target); } }