cn.wensiqun.asmsupport.utils.chooser
类 AbstractMethodChooser
java.lang.Object
cn.wensiqun.asmsupport.utils.chooser.AbstractMethodChooser
- 所有已实现的接口:
- DetermineMethodSignature, IMethodChooser
- 直接已知子类:
- ArrayClassMethodChooser, ProductClassMethodChooser, SemiClassMethodChooser
public abstract class AbstractMethodChooser
- extends Object
- implements IMethodChooser, DetermineMethodSignature
- 作者:
- 温斯群(Joe Wen)
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
invoker
protected AClass invoker
name
protected String name
argumentTypes
protected AClass[] argumentTypes
allArgTypes
protected List<AbstractMethodChooser.TypeTreeNode[]> allArgTypes
AbstractMethodChooser
public AbstractMethodChooser(AClass invoker,
String name,
AClass[] argumentTypes)
identifyPotentiallyApplicableMethods
public Map<AClass,List<MethodEntity>> identifyPotentiallyApplicableMethods()
- 从接口
DetermineMethodSignature 复制的描述
jsl3 := The Java™ Language Specification Third Edition
A member method is potentially applicable to a method invocation if and only if all of the following are true:
- The name of the member is identical to the name of the method in the method invocation.
- The member is accessible (jsl3 6.6) to the class or interface in which the method invocation appears.
- The arity of the member is lesser or equal to the arity of the method invocation.
- If the member is a variable arity method with arity n, the arity of the method invocation is greater or equal to n-1.
- If the member is a fixed arity method with arity n, the arity of the method invocation is equal to n.
- If the method invocation includes explicit type parameters, and the member is a generic method,
then the number of actual type parameters is equal to the number of formal type parameters.
- 指定者:
- 接口
DetermineMethodSignature 中的 identifyPotentiallyApplicableMethods
- 返回:
choosingTheMostSpecificMethod
public MethodEntity choosingTheMostSpecificMethod(List<MethodEntity> entities)
- 从接口
DetermineMethodSignature 复制的描述
Choosing the Most Specific Method
reference to : The Java™ Language Specification 15.12.2.5
- 指定者:
- 接口
DetermineMethodSignature 中的 choosingTheMostSpecificMethod
- 返回:
mostSpecificIndexForVariableVarify
protected int mostSpecificIndexForVariableVarify(List<AbstractMethodChooser.TypeTreeNode[]> methodArguments)
- 参数:
methodArguments -
- 返回:
determineMethodInJavaClass
protected cn.wensiqun.asmsupport.utils.chooser.AbstractMethodChooser.MethodEntityTypeTreeNodeCombine[] determineMethodInJavaClass(AClass invoker,
Class<?> javaClass,
String name,
AClass[] orgiArguTypes,
List<AbstractMethodChooser.TypeTreeNode[]> allArgTypes)
- 参数:
invoker - javaClass - name - orgiArguTypes - allArgTypes -
- 返回:
determineMostSpecificMethodEntity
protected MethodEntity determineMostSpecificMethodEntity(cn.wensiqun.asmsupport.utils.chooser.AbstractMethodChooser.MethodEntityTypeTreeNodeCombine[] mettnc)
- 参数:
mettnc -
- 返回:
applicableVariableVarifyMethod
protected List<MethodEntity> applicableVariableVarifyMethod(AClass invoker,
AClass acls,
String name,
AClass[] argumentTypes)
applicableVariableVarifyMethodArgumentsNodes
protected List<AbstractMethodChooser.TypeTreeNode[]> applicableVariableVarifyMethodArgumentsNodes(List<MethodEntity> applicable)
foundMethodWithNoArguments
protected abstract MethodEntity foundMethodWithNoArguments()
foundMethodWithNoArguments
protected MethodEntity foundMethodWithNoArguments(Class<?> cls)
convertToAClass
protected AClass[] convertToAClass(Class<?>[] clses)
chooseMethod
public MethodEntity chooseMethod()
- 指定者:
- 接口
IMethodChooser 中的 chooseMethod
Copyright © 2013. All Rights Reserved.