I need to provide some kind of facilities from enums and generics. Since enums cannot have type parameters (it's just forbidden by the grammar) and actually acts like public static final members I tend to write something like this:
public class GenericEnumLikeClass<T>{
public static GenericEnumLikeClass<MyType> TYPE_INSTANCE;
public static GenericEnumLikeClass<AnotherType> ANOTHER_INSTANCE;
//other things
}
The thing is I've never done something similar before and strictly speaking not sure about the correctness from the Java Conventions standpoint. Will it be considered as something strange or it's a commmon technique used when we need to extend enum-like behavior with providing Type Paramters?