How do I go from an object Classto a list of listings in general?
Class
i.e.
public static <T extends Enum> List<T> getList(Class<T> clazz)
I can not find a way to get to the method values()
values()
Class#getEnumConstants() returns enum constants (safe type).
Class#getEnumConstants()
So,
public static <T extends Enum> List<T> getList(Class<T> clazz) { return Arrays.asList(clazz.getEnumConstants()); }
Source: https://habr.com/ru/post/1745793/More articles:ASP.NET MVC2 - do specific fields in a form go through a specific object? - postHow can I crop strings in Java2D and add ... at the end? - javaOverriding Magento Admin Controller for beginners - phpResuming file upload in Google API Ver 2 - c #Libraries for creating and ranking ordered combinations? - c ++Альтернатива управлению WebBrowser в Windows CE - c#What are MKAnnotation and MKAnnotationView? - objective-cA different assembly name for each target platform - c #Tag List in stackoverflow - c #How to deploy ClickOnce.NET 3.5 application on a .NET 3.0 computer? - .netAll Articles