@Override public int containedTypeCount() { return _bindings.size(); }
@Override protected String buildCanonicalName() { StringBuilder sb = new StringBuilder(); sb.append(_class.getName()); final int count = _bindings.size(); if (count > 0) { sb.append('<'); for (int i = 0; i < count; ++i) { JavaType t = containedType(i); if (i > 0) { sb.append(','); } sb.append(t.toCanonical()); } sb.append('>'); } return sb.toString(); }
@Override public StringBuilder getGenericSignature(StringBuilder sb) { _classSignature(_class, sb, false); final int count = _bindings.size(); if (count > 0) { sb.append('<'); for (int i = 0; i < count; ++i) { sb = containedType(i).getGenericSignature(sb); } sb.append('>'); } sb.append(';'); return sb; }
@Override public boolean equals(Object o) { if (o == this) return true; if (!ClassUtil.hasClass(o, getClass())) { return false; } TypeBindings other = (TypeBindings) o; int len = _types.length; if (len != other.size()) { return false; } JavaType[] otherTypes = other._types; for (int i = 0; i < len; ++i) { if (!otherTypes[i].equals(_types[i])) { return false; } } return true; }
@Override public int containedTypeCount() { return _bindings.size(); }
@Override public int containedTypeCount() { return _bindings.size(); }
@Override public boolean equals(Object o) { if (o == this) return true; if (o == null || o.getClass() != getClass()) return false; TypeBindings other = (TypeBindings) o; int len = _types.length; if (len != other.size()) { return false; } JavaType[] otherTypes = other._types; for (int i = 0; i < len; ++i) { if (!otherTypes[i].equals(_types[i])) { return false; } } return true; }
@Override protected String buildCanonicalName() { StringBuilder sb = new StringBuilder(); sb.append(_class.getName()); final int count = _bindings.size(); if (count > 0) { sb.append('<'); for (int i = 0; i < count; ++i) { JavaType t = containedType(i); if (i > 0) { sb.append(','); } sb.append(t.toCanonical()); } sb.append('>'); } return sb.toString(); }
@Override protected String buildCanonicalName() { StringBuilder sb = new StringBuilder(); sb.append(_class.getName()); final int count = _bindings.size(); if (count > 0) { sb.append('<'); for (int i = 0; i < count; ++i) { JavaType t = containedType(i); if (i > 0) { sb.append(','); } sb.append(t.toCanonical()); } sb.append('>'); } return sb.toString(); }
private JavaType resolve(final JavaType type) { Assert.notNull(type, "type can't be null"); JavaType tmp = type; while(Keeper.class.equals(tmp.getRawClass())) { TypeBindings bindings = tmp.getBindings(); Assert.isTrue(bindings.size() == 1, "Bindings must have one parameter type: " + type); tmp = bindings.getBoundType(0); } return tmp; }
@Override public StringBuilder getGenericSignature(StringBuilder sb) { _classSignature(_class, sb, false); final int count = _bindings.size(); if (count > 0) { sb.append('<'); for (int i = 0; i < count; ++i) { sb = containedType(i).getGenericSignature(sb); } sb.append('>'); } sb.append(';'); return sb; }
@Override public StringBuilder getGenericSignature(StringBuilder sb) { _classSignature(_class, sb, false); final int count = _bindings.size(); if (count > 0) { sb.append('<'); for (int i = 0; i < count; ++i) { sb = containedType(i).getGenericSignature(sb); } sb.append('>'); } sb.append(';'); return sb; }
@Override public boolean equals(Object o) { if (o == this) return true; if (!ClassUtil.hasClass(o, getClass())) { return false; } TypeBindings other = (TypeBindings) o; int len = _types.length; if (len != other.size()) { return false; } JavaType[] otherTypes = other._types; for (int i = 0; i < len; ++i) { if (!otherTypes[i].equals(_types[i])) { return false; } } return true; }