@Override public boolean equals(Object o) { return o instanceof Element && ((Element) o).setName().equals(setName()) && ((Element) o).uniqueId() == uniqueId() && ((Element) o).type() == type() && ((Element) o).keyType().equals(keyType()); }
private boolean keyMatches(Key<?> key) { return key.getTypeLiteral().equals(elementType) && key.getAnnotation() instanceof Element && ((Element) key.getAnnotation()).setName().equals(setName) && ((Element) key.getAnnotation()).type() == MULTIBINDER; }
IndexedBinding(Binding<?> binding, BindingType type, Object scope, Object extraEquality) { this.scope = scope; this.type = type; this.extraEquality = extraEquality; this.typeLiteral = binding.getKey().getTypeLiteral(); Element annotation = (Element) binding.getKey().getAnnotation(); this.annotationName = annotation.setName(); this.annotationType = annotation.type(); }