@Override public boolean equals(Object other) { if (this == other) { return true; } else if (!(other instanceof Generic)) { return false; } Generic typeDescription = (Generic) other; return typeDescription.getSort().isTypeVariable() && getSymbol().equals(typeDescription.getSymbol()) && getTypeVariableSource().equals(typeDescription.getTypeVariableSource()); }
@Override public boolean equals(Object other) { if (this == other) { return true; } else if (!(other instanceof Generic)) { return false; } Generic typeDescription = (Generic) other; return typeDescription.getSort().isTypeVariable() && getSymbol().equals(typeDescription.getSymbol()); }
} else if (!bounds.add(bound)) { throw new IllegalStateException("Duplicate bound " + bound + " of " + typeVariable + " for " + this); } else if (interfaceBound && (bound.getSort().isTypeVariable() || !bound.isInterface())) { throw new IllegalStateException("Illegal interface bound " + bound + " of " + typeVariable + " for " + this); } else if (!bounds.add(bound)) { throw new IllegalStateException("Duplicate bound " + bound + " of " + typeVariable + " for " + methodDescription); } else if (interfaceBound && (bound.getSort().isTypeVariable() || !bound.isInterface())) { throw new IllegalStateException("Illegal interface bound " + bound + " of " + typeVariable + " for " + methodDescription);
annotationAppender = annotationAppender.append(annotationDescription, annotationValueFilter, typeReference, EMPTY_TYPE_PATH); int boundIndex = !typeVariable.getUpperBounds().get(0).getSort().isTypeVariable() && typeVariable.getUpperBounds().get(0).isInterface() ? 1 : 0;