@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof ModelType)) { return false; } ModelType<?> modelType = (ModelType<?>) o; return wrapper.equals(modelType.wrapper); }
public Class<T> getConcreteClass() { return Cast.uncheckedCast(wrapper.getRawClass()); }
public Class<? super T> getRawClass() { return Cast.uncheckedCast(wrapper.getRawClass()); }
@Override public int hashCode() { return wrapper.hashCode(); }
public String toString() { return wrapper.getRepresentation(true); }
/** Returns a human-readable name for the type. */ public String getDisplayName() { return wrapper.getRepresentation(false); }
public String getName() { return wrapper.getRepresentation(true); }
public List<Class<?>> getAllClasses() { ImmutableList.Builder<Class<?>> builder = ImmutableList.builder(); wrapper.collectClasses(builder); return builder.build(); }
public boolean isAssignableFrom(ModelType<?> modelType) { return modelType == this || wrapper.isAssignableFrom(modelType.wrapper); }