Top Description Constructors Methods
com.google.inject.internal

public final Class DeclaredMembers

extends Object
Class Inheritance
Imports
com.google.common.collect.Ordering, java.lang.reflect.Field, .Method, java.util.Arrays, .Comparator

Utility class for retrieving declared fields or methods in a particular order, because the JVM doesn't guarantee ordering for listing declared methods. We don't externally guarantee an ordering, but having a consistent ordering allows deterministic behavior and simpler tests.

For class ordering, within a single classloader there can only be one class with a given name, so we just compare the names.

For 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.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Field[]
public static Method[]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

DeclaredMembersback to summary
private DeclaredMembers()

Method Detail

getDeclaredFieldsback to summary
public static Field[] getDeclaredFields(Class<?> type)
getDeclaredMethodsback to summary
public static Method[] getDeclaredMethods(Class<?> type)