| Modifier and Type | Field and Description |
|---|---|
| private final List | candidates
Reverse order of declaration; super-methods appear later in the list. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public MethodPartition | |
| public void | collectEnhanceableMethods(TypeLiteral<?> hostType, Consumer<Method> methodVisitor, Map<Method, Method> bridgeDelegates)
Resolve and collect enhanceable methods into the given list; one per method-signature. |
| private static String | parametersKey(Class<?>[] parameterTypes)
Each method is uniquely identified in the partition by its actual parameter types. |
| private static boolean | resolvedParametersMatch(Method subMethod, TypeLiteral<?> host, Method superMethod)
Compares a sub-method with a generic super-method by resolving it against the host class. |
| candidates | back to summary |
|---|---|
| private final List<Method> candidates Reverse order of declaration; super-methods appear later in the list. | |
| MethodPartition | back to summary |
|---|---|
| public MethodPartition(Method first, Method second) Each partition starts off with at least two methods. | |
| addCandidate | back to summary |
|---|---|
| public MethodPartition addCandidate(Method method) Add a new method to this partition for resolution. | |
| collectEnhanceableMethods | back to summary |
|---|---|
| public void collectEnhanceableMethods(TypeLiteral<?> hostType, Consumer<Method> methodVisitor, Map<Method, Method> bridgeDelegates) Resolve and collect enhanceable methods into the given list; one per method-signature. Methods declared in sub-classes are preferred over those in super-classes with the same signature. (Unless it's a bridge method, in which case we prefer to report the non-bridge method from the super-class as a convenience to AOP method matchers that always ignore synthetic methods.) At the same time we use generic type resolution to match resolved bridge methods to the methods they delegate to (this avoids the need to crack open the original class resource for in-depth analysis by ASM, especially since the class bytes might not be accessible.) | |
| parametersKey | back to summary |
|---|---|
| private static String parametersKey(Class<?>[] parameterTypes) Each method is uniquely identified in the partition by its actual parameter types. | |
| resolvedParametersMatch | back to summary |
|---|---|
| private static boolean resolvedParametersMatch(Method subMethod, TypeLiteral<?> host, Method superMethod) Compares a sub-method with a generic super-method by resolving it against the host class. | |