private String formatSpecialization() { if (!isUninitialized() && !isGeneric()) { Object snapshot = this.cachedValue; if (snapshot == null) { return String.format("value == null"); } else { if (snapshot instanceof Byte || snapshot instanceof Short || snapshot instanceof Integer || snapshot instanceof Long || snapshot instanceof Float || snapshot instanceof Double || snapshot instanceof Boolean || snapshot instanceof Character) { return String.format("value == (%s)%s", snapshot.getClass().getSimpleName(), snapshot); } else { String simpleName = snapshot.getClass().getSimpleName(); return String.format("value == %s@%x", simpleName, Objects.hash(snapshot)); } } } return null; }
private String formatSpecialization() { if (!isUninitialized() && !isGeneric()) { Object snapshot = this.cachedValue; if (snapshot == null) { return String.format("value == null"); } else { if (snapshot instanceof Byte || snapshot instanceof Short || snapshot instanceof Integer || snapshot instanceof Long || snapshot instanceof Float || snapshot instanceof Double || snapshot instanceof Boolean || snapshot instanceof Character) { return String.format("value == (%s)%s", snapshot.getClass().getSimpleName(), snapshot); } else { String simpleName = snapshot.getClass().getSimpleName(); return String.format("value == %s@%x", simpleName, Objects.hash(snapshot)); } } } return null; }
@Override public String toString() { return toString(PrimitiveValueProfile.class, isUninitialized(), isGeneric(), formatSpecialization()); }
@Override public String toString() { return toString(PrimitiveValueProfile.class, isUninitialized(), isGeneric(), formatSpecialization()); }