public final class DeclaredMembers
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static com.google.common.collect.Ordering<java.lang.Class<?>> |
CLASS_ORDERING
An ordering suitable for comparing two classes if they are loaded by the same classloader
|
private static com.google.common.collect.Ordering<java.lang.reflect.Field> |
FIELD_ORDERING
An ordering suitable for comparing two fields if they are owned by the same class.
|
private static com.google.common.collect.Ordering<java.lang.reflect.Method> |
METHOD_ORDERING
An ordering suitable for comparing two methods if they are owned by the same class.
|
Modifier | Constructor and Description |
---|---|
private |
DeclaredMembers() |
Modifier and Type | Method and Description |
---|---|
static java.lang.reflect.Field[] |
getDeclaredFields(java.lang.Class<?> type) |
static java.lang.reflect.Method[] |
getDeclaredMethods(java.lang.Class<?> type) |
private static final com.google.common.collect.Ordering<java.lang.Class<?>> CLASS_ORDERING
Within a single classloader there can only be one class with a given name, so we just compare the names.
private static final com.google.common.collect.Ordering<java.lang.reflect.Field> FIELD_ORDERING
Within a single class it is sufficent to compare the non-generic field signature which consists of the field name and type.
private static final com.google.common.collect.Ordering<java.lang.reflect.Method> METHOD_ORDERING
Within a single class it is sufficient to compare the non-generic method signature which consists of the name, return type and parameter types.