java.lang.Object
com.djrapitops.plan.delivery.domain.keys.Type<T>

public abstract class Type<T> extends Object
Similar to Google's TypeToken but without requiring whole gson package.

Create new instance with new Type<YourObject>() {}.

  • Constructor Details

    • Type

      protected Type()
  • Method Details

    • ofClass

      public static <K> Type<K> ofClass(Class<K> of)
    • of

      public static <K> Type<K> of(K object)
    • getGenericsClass

      public Class<Type<T>> getGenericsClass()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object