Methods/Constructors,
extracted and refactored from MethodUtils when it was imported from Commons BeanUtils.
| Modifier and Type | Class and Description |
|---|---|
| private static class | MemberUtils.
A class providing a subset of the API of java.lang.reflect.Executable in Java 1.8, providing a common representation for function signatures for Constructors and Methods. |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final Class | WIDENING_PRIMITIVE_TYPES
Array of primitive number types ordered by "promotability" from narrow to wide. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static int | Returns: int consistent withcompare semantics.the "left" Constructor. left, final Constructor<?> the "right" Constructor. right, final Class<?>[] the runtime parameter types to match against. actual)left/right.Compares the relative fitness of two Constructors in terms of how well they match a set of runtime parameter types, such that a list ordered by the results of the comparison would return the best match first (least). |
| pack-priv static int | Returns: int consistent withcompare semantics.the "left" Method. left, final Method the "right" Method. right, final Class<?>[] the runtime parameter types to match against. actual)left/right.Compares the relative fitness of two Methods in terms of how well they match a set of runtime parameter types, such that a list ordered by the results of the comparison would return the best match first (least). |
| private static int | Returns: int consistent withcompare semantics.the "left" Executable. left,the "right" Executable. right,the runtime parameter types to match against. actual)left/right.Compares the relative fitness of two Executables in terms of how well they match a set of runtime parameter types, such that a list ordered by the results of the comparison would return the best match first (least). |
| private static float | Returns: The cost of transforming an object.The source class. srcClass, final Class<?> The destination class. destClass)Gets the number of steps needed to turn the source class into the destination class. |
| private static float | Returns: The cost of promoting the primitive.the (primitive) source class. srcClass, final Class<?> the (primitive) destination class. destClass)Gets the number of steps required to promote a primitive to another type. |
| private static float | Returns: The total transformation cost.The source arguments. srcArgs, final MemberUtils.The executable to calculate transformation costs for. executableGets the sum of the object transformation cost for each class in the source argument list. |
| pack-priv static boolean | Returns: true if m is accessible.Member to test, may be null. member)Tests whether a |
| pack-priv static boolean | |
| private static boolean | |
| pack-priv static boolean | |
| pack-priv static boolean | Returns: true unless package/protected/private modifier detectedto test. modifiers)Tests whether a given set of modifiers implies package access. |
| pack-priv static boolean | |
| pack-priv static boolean | |
| pack-priv static <T extends AccessibleObject> T | Returns: a boolean indicating whether the accessibility of the object was set to true.the AccessibleObject to set as accessible, may be null. obj)Default access superclass workaround. |
| ACCESS_TEST | back to summary |
|---|---|
| private static final int ACCESS_TEST | |
| WIDENING_PRIMITIVE_TYPES | back to summary |
|---|---|
| private static final Class<?>[] WIDENING_PRIMITIVE_TYPES Array of primitive number types ordered by "promotability" from narrow to wide. | |
| MemberUtils | back to summary |
|---|---|
| pack-priv MemberUtils() | |
| compareConstructorFit | back to summary |
|---|---|
| pack-priv static int compareConstructorFit(final Constructor<?> left, final Constructor<?> right, final Class<?>[] actual) Compares the relative fitness of two Constructors in terms of how well they match a set of runtime parameter types, such that a list ordered by the results of the comparison would return the best match first (least).
| |
| compareMethodFit | back to summary |
|---|---|
| pack-priv static int compareMethodFit(final Method left, final Method right, final Class<?>[] actual) Compares the relative fitness of two Methods in terms of how well they match a set of runtime parameter types, such that a list ordered by the results of the comparison would return the best match first (least). | |
| compareParameterTypes | back to summary |
|---|---|
| private static int compareParameterTypes(final MemberUtils. Compares the relative fitness of two Executables in terms of how well they match a set of runtime parameter types, such that a list ordered by the results of the comparison would return the best match first (least).
| |
| getObjectTransformationCost | back to summary |
|---|---|
| private static float getObjectTransformationCost(Class<?> srcClass, final Class<?> destClass) Gets the number of steps needed to turn the source class into the destination class. This represents the number of steps in the object hierarchy graph. | |
| getPrimitivePromotionCost | back to summary |
|---|---|
| private static float getPrimitivePromotionCost(final Class<?> srcClass, final Class<?> destClass) Gets the number of steps required to promote a primitive to another type. | |
| getTotalTransformationCost | back to summary |
|---|---|
| private static float getTotalTransformationCost(final Class<?>[] srcArgs, final MemberUtils. Gets the sum of the object transformation cost for each class in the source argument list.
| |
| isAccessible | back to summary |
|---|---|
| pack-priv static boolean isAccessible(final Member member) Tests whether a
| |
| isMatchingConstructor | back to summary |
|---|---|
| pack-priv static boolean isMatchingConstructor(final Constructor<?> method, final Class<?>[] parameterTypes) | |
| isMatchingExecutable | back to summary |
|---|---|
| private static boolean isMatchingExecutable(final MemberUtils. | |
| isMatchingMethod | back to summary |
|---|---|
| pack-priv static boolean isMatchingMethod(final Method method, final Class<?>[] parameterTypes) | |
| isPackage | back to summary |
|---|---|
| pack-priv static boolean isPackage(final int modifiers) Tests whether a given set of modifiers implies package access.
| |
| isPublic | back to summary |
|---|---|
| pack-priv static boolean isPublic(final Member member) Tests whether a
| |
| isStatic | back to summary |
|---|---|
| pack-priv static boolean isStatic(final Member member) Tests whether a
| |
| setAccessibleWorkaround | back to summary |
|---|---|
| pack-priv static <T extends AccessibleObject> T setAccessibleWorkaround(final T obj) Default access superclass workaround.
When a
| |
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final Class |
| Access | Constructor and Description |
|---|---|
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Class | |
| public boolean | |
| private static MemberUtils. | |
| private static MemberUtils. |
| isVarArgs | back to summary |
|---|---|
| private final boolean isVarArgs | |
| parameterTypes | back to summary |
|---|---|
| private final Class<?>[] parameterTypes | |
| Executable | back to summary |
|---|---|
| private Executable(final Constructor<?> constructor) | |
| Executable | back to summary |
|---|---|
| private Executable(final Method method) | |
| getParameterTypes | back to summary |
|---|---|
| public Class | |
| isVarArgs | back to summary |
|---|---|
| public boolean isVarArgs() | |
| of | back to summary |
|---|---|
| private static MemberUtils. | |
| of | back to summary |
|---|---|
| private static MemberUtils. | |