Beispiel #1
0
  @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);
  }
Beispiel #2
0
 public Class<T> getConcreteClass() {
   return Cast.uncheckedCast(wrapper.getRawClass());
 }
Beispiel #3
0
 public Class<? super T> getRawClass() {
   return Cast.uncheckedCast(wrapper.getRawClass());
 }
Beispiel #4
0
 @Override
 public int hashCode() {
   return wrapper.hashCode();
 }
Beispiel #5
0
 public String toString() {
   return wrapper.getRepresentation(true);
 }
Beispiel #6
0
 /** Returns a human-readable name for the type. */
 public String getDisplayName() {
   return wrapper.getRepresentation(false);
 }
Beispiel #7
0
 public String getName() {
   return wrapper.getRepresentation(true);
 }
Beispiel #8
0
 public List<Class<?>> getAllClasses() {
   ImmutableList.Builder<Class<?>> builder = ImmutableList.builder();
   wrapper.collectClasses(builder);
   return builder.build();
 }
Beispiel #9
0
 public boolean isAssignableFrom(ModelType<?> modelType) {
   return modelType == this || wrapper.isAssignableFrom(modelType.wrapper);
 }