< prev index next >
src/java.base/share/classes/sun/reflect/generics/reflectiveObjects/GenericArrayTypeImpl.java
Print this page
*** 63,81 ****
public Type getGenericComponentType() {
return genericComponentType; // return cached component type
}
public String toString() {
! Type componentType = getGenericComponentType();
! StringBuilder sb = new StringBuilder();
!
! if (componentType instanceof Class)
! sb.append(((Class)componentType).getName() );
! else
! sb.append(componentType.toString());
! sb.append("[]");
! return sb.toString();
}
@Override
public boolean equals(Object o) {
if (o instanceof GenericArrayType) {
--- 63,73 ----
public Type getGenericComponentType() {
return genericComponentType; // return cached component type
}
public String toString() {
! return getGenericComponentType().getTypeName() + "[]";
}
@Override
public boolean equals(Object o) {
if (o instanceof GenericArrayType) {
< prev index next >