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)

嵌套类摘要
 class AbstractMethodChooser.AmbiguousException
           
static class AbstractMethodChooser.TypeTreeNode
           
 
字段摘要
protected  List<AbstractMethodChooser.TypeTreeNode[]> allArgTypes
           
protected  AClass[] argumentTypes
           
protected  AClass invoker
           
protected  String name
           
 
构造方法摘要
AbstractMethodChooser(AClass invoker, String name, AClass[] argumentTypes)
           
 
方法摘要
protected  List<MethodEntity> applicableVariableVarifyMethod(AClass invoker, AClass acls, String name, AClass[] argumentTypes)
           
protected  List<AbstractMethodChooser.TypeTreeNode[]> applicableVariableVarifyMethodArgumentsNodes(List<MethodEntity> applicable)
           
 MethodEntity chooseMethod()
           
 MethodEntity choosingTheMostSpecificMethod(List<MethodEntity> entities)
           Choosing the Most Specific Method
reference to : The Java™ Language Specification 15.12.2.5
protected  AClass[] convertToAClass(Class<?>[] clses)
           
protected  cn.wensiqun.asmsupport.utils.chooser.AbstractMethodChooser.MethodEntityTypeTreeNodeCombine[] determineMethodInJavaClass(AClass invoker, Class<?> javaClass, String name, AClass[] orgiArguTypes, List<AbstractMethodChooser.TypeTreeNode[]> allArgTypes)
           
protected  MethodEntity determineMostSpecificMethodEntity(cn.wensiqun.asmsupport.utils.chooser.AbstractMethodChooser.MethodEntityTypeTreeNodeCombine[] mettnc)
           
protected abstract  MethodEntity foundMethodWithNoArguments()
           
protected  MethodEntity foundMethodWithNoArguments(Class<?> cls)
           
 Map<AClass,List<MethodEntity>> identifyPotentiallyApplicableMethods()
          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.
protected  int mostSpecificIndexForVariableVarify(List<AbstractMethodChooser.TypeTreeNode[]> methodArguments)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
从接口 cn.wensiqun.asmsupport.utils.chooser.DetermineMethodSignature 继承的方法
firstPhase, secondPhase, thirdPhase
 

字段详细信息

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:

  1. The name of the member is identical to the name of the method in the method invocation.
  2. The member is accessible (jsl3 6.6) to the class or interface in which the method invocation appears.
  3. The arity of the member is lesser or equal to the arity of the method invocation.
  4. If the member is a variable arity method with arity n, the arity of the method invocation is greater or equal to n-1.
  5. If the member is a fixed arity method with arity n, the arity of the method invocation is equal to n.
  6. 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.