Package gw.lang.reflect
Class MethodScorer
java.lang.Object
gw.lang.reflect.MethodScorer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MethodScorer.MethodScoreCacheprivate final TypeSystemAwareCache<Pair<IType,IType>, Double> static final intprivate static MethodScorerstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble_addToScoreForTypes(List<IType> inferringTypes, IType paramType, IType argType) doubleaddDegreesOfSeparation(IType parameterType, IType exprType, List<IType> inferringTypes) doubleprivate doubleaddDegreesOfSeparationFromParameterization(IType parameterType, IType exprType, List<IType> inferringTypes) doubleaddToScoreForTypes(List<IType> inferringTypes, IType paramType, IType argType) private booleanarePrimitiveTypesCompatible(IType paramType, IType argType) getCachedMethodScore(IInvocableType funcType, IType callsiteEnclosingType, IType rootType, List<IType> argTypes) <E extends IType>
EgetGenericType(E type) static MethodScorerinstance()private IInvocableTypematchInOverloads(List<? extends IInvocableType> listOverloads, IInvocableType cachedFuncType) putCachedMethodScore(MethodScore score) voiddoublescoreMethod(IInvocableType funcType, List<IType> argTypes, List<IType> inferringTypes) scoreMethod(IType callsiteEnclosingType, IType rootType, IInvocableType funcType, List<? extends IInvocableType> listFunctionTypes, List<IType> argTypes, List<IType> inferringTypes, boolean bSkipScoring, boolean bLookInCache) scoreMethods(List<IInvocableType> funcTypes, List<IType> argTypes)
-
Field Details
-
BOXED_COERCION_SCORE
public static final int BOXED_COERCION_SCORE- See Also:
-
PRIMITIVE_COERCION_SCORE
public static final int PRIMITIVE_COERCION_SCORE- See Also:
-
INSTANCE
-
_typeScoreCache
-
_methodScoreCache
-
-
Constructor Details
-
MethodScorer
private MethodScorer()
-
-
Method Details
-
instance
-
scoreMethods
-
scoreMethod
public MethodScore scoreMethod(IType callsiteEnclosingType, IType rootType, IInvocableType funcType, List<? extends IInvocableType> listFunctionTypes, List<IType> argTypes, List<IType> inferringTypes, boolean bSkipScoring, boolean bLookInCache) -
matchInOverloads
private IInvocableType matchInOverloads(List<? extends IInvocableType> listOverloads, IInvocableType cachedFuncType) -
scoreMethod
public double scoreMethod(IInvocableType funcType, List<IType> argTypes, List<IType> inferringTypes) -
addToScoreForTypes
-
_addToScoreForTypes
-
arePrimitiveTypesCompatible
-
addDegreesOfSeparation
-
addDegreesOfSeparationFromParameterization
-
addDegreesOfSeparation
-
getGenericType
-
getCachedMethodScore
public IInvocableType getCachedMethodScore(IInvocableType funcType, IType callsiteEnclosingType, IType rootType, List<IType> argTypes) -
putCachedMethodScore
-
removeCachedMethodScore
-