I need a simple enum declaring the Java reference types, as:public enum ReferenceType {    STRONG, SOFT, WEAK, PHANTOM;}Does such enum exist somewhere in the Java API or a general utility library such as Guava ? I have not been able to find it in either place, although I found third party projects that declare it (e.g. google-guice: RefrenceType).I just try to avoid polluting my project with silly classes/enums that may exist somewhere else.Since asking this question, I found that Guava in fact used to have this, but they dropped it: Issue 1662:  Feature request for enum of reference types
enum for Java reference types
java
You can find one in hibernate ReferenceType though it only contains STRONG, SOFT and WEAK but not PHANTOM.There are few others ReferenceType in eclipse net4j and Link.Type in true commons. But I think you will be better without them in case you want some modification later.