Package gw.lang.reflect
Class MethodScorer
- java.lang.Object
-
- gw.lang.reflect.MethodScorer
-
public class MethodScorer extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MethodScorer.MethodScoreKey
-
Field Summary
Fields Modifier and Type Field Description static int
BOXED_COERCION_SCORE
static int
PRIMITIVE_COERCION_SCORE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description double
_addToScoreForTypes(List<IType> inferringTypes, IType paramType, IType argType)
double
addDegreesOfSeparation(IType parameterType, IType exprType, List<IType> inferringTypes)
double
addDegreesOfSeparation(IType parameterType, Set<? extends IType> types, List<IType> inferringTypes)
double
addToScoreForTypes(List<IType> inferringTypes, IType paramType, IType argType)
IInvocableType
getCachedMethodScore(IInvocableType funcType, IType callsiteEnclosingType, IType rootType, List<IType> argTypes)
<E extends IType>
EgetGenericType(E type)
static MethodScorer
instance()
MethodScorer.MethodScoreKey
putCachedMethodScore(MethodScore score)
void
removeCachedMethodScore(MethodScorer.MethodScoreKey key)
double
scoreMethod(IInvocableType funcType, List<IType> argTypes, List<IType> inferringTypes)
MethodScore
scoreMethod(IType callsiteEnclosingType, IType rootType, IInvocableType funcType, List<? extends IInvocableType> listFunctionTypes, List<IType> argTypes, List<IType> inferringTypes, boolean bSkipScoring, boolean bLookInCache)
List<MethodScore>
scoreMethods(List<IInvocableType> funcTypes, List<IType> argTypes)
-
-
-
Field Detail
-
BOXED_COERCION_SCORE
public static final int BOXED_COERCION_SCORE
- See Also:
- Constant Field Values
-
PRIMITIVE_COERCION_SCORE
public static final int PRIMITIVE_COERCION_SCORE
- See Also:
- Constant Field Values
-
-
Method Detail
-
instance
public static MethodScorer instance()
-
scoreMethods
public List<MethodScore> scoreMethods(List<IInvocableType> funcTypes, List<IType> argTypes)
-
scoreMethod
public MethodScore scoreMethod(IType callsiteEnclosingType, IType rootType, IInvocableType funcType, List<? extends IInvocableType> listFunctionTypes, List<IType> argTypes, List<IType> inferringTypes, boolean bSkipScoring, boolean bLookInCache)
-
scoreMethod
public double scoreMethod(IInvocableType funcType, List<IType> argTypes, List<IType> inferringTypes)
-
addToScoreForTypes
public double addToScoreForTypes(List<IType> inferringTypes, IType paramType, IType argType)
-
_addToScoreForTypes
public double _addToScoreForTypes(List<IType> inferringTypes, IType paramType, IType argType)
-
addDegreesOfSeparation
public double addDegreesOfSeparation(IType parameterType, IType exprType, List<IType> inferringTypes)
-
addDegreesOfSeparation
public double addDegreesOfSeparation(IType parameterType, Set<? extends IType> types, List<IType> inferringTypes)
-
getGenericType
public <E extends IType> E getGenericType(E type)
-
getCachedMethodScore
public IInvocableType getCachedMethodScore(IInvocableType funcType, IType callsiteEnclosingType, IType rootType, List<IType> argTypes)
-
putCachedMethodScore
public MethodScorer.MethodScoreKey putCachedMethodScore(MethodScore score)
-
removeCachedMethodScore
public void removeCachedMethodScore(MethodScorer.MethodScoreKey key)
-
-