This commit is contained in:
@@ -77,11 +77,11 @@ public abstract class TypeToken<T> {
|
|||||||
|
|
||||||
private final Type ownerType = ownerType0;
|
private final Type ownerType = ownerType0;
|
||||||
|
|
||||||
private final Type[] argTypes = actualTypeArguments0;
|
private final Type[] actualTypeArguments = actualTypeArguments0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Type[] getActualTypeArguments() {
|
public Type[] getActualTypeArguments() {
|
||||||
return argTypes.clone();
|
return actualTypeArguments.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -96,7 +96,7 @@ public abstract class TypeToken<T> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Arrays.hashCode(argTypes) ^ Objects.hashCode(rawType) ^ Objects.hashCode(ownerType);
|
return Arrays.hashCode(actualTypeArguments) ^ Objects.hashCode(rawType) ^ Objects.hashCode(ownerType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -106,7 +106,7 @@ public abstract class TypeToken<T> {
|
|||||||
if (this == that) return true;
|
if (this == that) return true;
|
||||||
return Objects.equals(ownerType, that.getOwnerType())
|
return Objects.equals(ownerType, that.getOwnerType())
|
||||||
&& Objects.equals(rawType, that.getRawType())
|
&& Objects.equals(rawType, that.getRawType())
|
||||||
&& Arrays.equals(argTypes, that.getActualTypeArguments());
|
&& Arrays.equals(actualTypeArguments, that.getActualTypeArguments());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -115,10 +115,10 @@ public abstract class TypeToken<T> {
|
|||||||
if (ownerType != null) sb.append((ownerType instanceof Class) ? (((Class) ownerType).getName()) : ownerType.toString()).append(".");
|
if (ownerType != null) sb.append((ownerType instanceof Class) ? (((Class) ownerType).getName()) : ownerType.toString()).append(".");
|
||||||
sb.append(rawType.getName());
|
sb.append(rawType.getName());
|
||||||
|
|
||||||
if (argTypes != null && argTypes.length > 0) {
|
if (actualTypeArguments != null && actualTypeArguments.length > 0) {
|
||||||
sb.append("<");
|
sb.append("<");
|
||||||
boolean first = true;
|
boolean first = true;
|
||||||
for (Type t : argTypes) {
|
for (Type t : actualTypeArguments) {
|
||||||
if (!first) sb.append(", ");
|
if (!first) sb.append(", ");
|
||||||
sb.append(t.getTypeName());
|
sb.append(t.getTypeName());
|
||||||
first = false;
|
first = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user