Package org.plumelib.util
Class ClassDeterministic
java.lang.Object
org.plumelib.util.ClassDeterministic
Deterministic versions of
java.lang.Class methods, which return arrays in sorted order.-
Method Summary
Modifier and TypeMethodDescriptionstatic Annotation[]getAnnotations(Class<?> c) LikeClass.getAnnotations(), but returns the methods in deterministic order.static Class<?>[]getClasses(Class<?> c) LikeClass.getClasses(), but returns the classes in deterministic order.static Constructor<?>[]getConstructors(Class<?> c) LikeClass.getConstructors(), but returns the methods in deterministic order.static Annotation[]getDeclaredAnnotations(Class<?> c) LikeClass.getDeclaredAnnotations(), but returns the methods in deterministic order.static Class<?>[]getDeclaredClasses(Class<?> c) LikeClass.getDeclaredClasses(), but returns the classes in deterministic order.static Constructor<?>[]getDeclaredConstructors(Class<?> c) LikeClass.getDeclaredConstructors(), but returns the methods in deterministic order.static Field[]getDeclaredFields(Class<?> c) LikeClass.getDeclaredFields(), but returns the methods in deterministic order.static Method[]getDeclaredMethods(Class<?> c) LikeClass.getDeclaredMethods(), but returns the methods in deterministic order.static <@Interned T>
T @Nullable []getEnumConstants(Class<@Interned T> c) LikeClass.getEnumConstants(), but returns the methods in deterministic order.static Field[]LikeClass.getFields(), but returns the methods in deterministic order.static Method[]getMethods(Class<?> c) LikeClass.getMethods(), but returns the methods in deterministic order.
-
Method Details
-
getAnnotations
LikeClass.getAnnotations(), but returns the methods in deterministic order.- Parameters:
c- the Class whose annotations to return- Returns:
- the class's annotations
-
getDeclaredAnnotations
LikeClass.getDeclaredAnnotations(), but returns the methods in deterministic order.- Parameters:
c- the Class whose declared annotations to return- Returns:
- the class's declared annotations
-
getClasses
LikeClass.getClasses(), but returns the classes in deterministic order.- Parameters:
c- the Class whose member classes to return- Returns:
- the class's member classes
-
getDeclaredClasses
LikeClass.getDeclaredClasses(), but returns the classes in deterministic order.- Parameters:
c- the Class whose declared member classes to return- Returns:
- the class's declared member classes
-
getEnumConstants
LikeClass.getEnumConstants(), but returns the methods in deterministic order. Returns null if the argument is not an enum class.- Type Parameters:
T- the class's type parameter- Parameters:
c- the Class whose enum constants to return- Returns:
- the class's enum constants
-
getConstructors
LikeClass.getConstructors(), but returns the methods in deterministic order.- Parameters:
c- the Class whose constructors to return- Returns:
- the class's constructors
-
getDeclaredConstructors
LikeClass.getDeclaredConstructors(), but returns the methods in deterministic order.- Parameters:
c- the Class whose declared constructors to return- Returns:
- the class's declared constructors
-
getFields
LikeClass.getFields(), but returns the methods in deterministic order.- Parameters:
c- the Class whose fields to return- Returns:
- the class's fields
-
getDeclaredFields
LikeClass.getDeclaredFields(), but returns the methods in deterministic order.- Parameters:
c- the Class whose declared fields to return- Returns:
- the class's declared fields
-
getMethods
LikeClass.getMethods(), but returns the methods in deterministic order.- Parameters:
c- the Class whose methods to return- Returns:
- the class's methods
-
getDeclaredMethods
LikeClass.getDeclaredMethods(), but returns the methods in deterministic order.- Parameters:
c- the Class whose declared methods to return- Returns:
- the class's declared methods
-