Class MethodTypeResolution
- java.lang.Object
-
- net.sourceforge.pmd.lang.java.typeresolution.MethodTypeResolution
-
@Deprecated @InternalApi public final class MethodTypeResolution extends Object
Deprecated.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static JavaTypeDefinition
boxPrimitive(JavaTypeDefinition def)
Deprecated.static boolean
checkSubtypeability(MethodType method, MethodType subtypeableMethod)
Deprecated.static List<MethodType>
getApplicableMethods(JavaTypeDefinition context, String methodName, List<JavaTypeDefinition> typeArguments, int argArity, Class<?> accessingClass)
Deprecated.Looks for potentially applicable methods in a given type definition.static int
getArity(Method method)
Deprecated.static JavaTypeDefinition
getBestMethodReturnType(JavaTypeDefinition context, List<MethodType> methods, ASTArgumentList arguments)
Deprecated.Searches a list of methods by trying the three phases of method overload resolution.static List<JavaTypeDefinition>
getMethodExplicitTypeArugments(Node node)
Deprecated.static MethodType
getTypeDefOfMethod(JavaTypeDefinition context, Method method, List<JavaTypeDefinition> typeArguments)
Deprecated.static boolean
isGeneric(Class<?> clazz)
Deprecated.static boolean
isGeneric(Method method)
Deprecated.static boolean
isMemberVisibleFromClass(Class<?> classWithMember, int modifiers, Class<?> accessingClass)
Deprecated.Given a class, the modifiers of on of it's member and the class that is trying to access that member, returns true is the member is accessible from the accessingClass Class.static boolean
isMethodApplicable(Method method, String methodName, int argArity, Class<?> accessingClass, List<JavaTypeDefinition> typeArguments)
Deprecated.https://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.12.2.1 Potential applicability.static boolean
isMethodConvertible(JavaTypeDefinition parameter, ASTExpression argument)
Deprecated.static boolean
isMethodConvertible(JavaTypeDefinition parameter, JavaTypeDefinition argument)
Deprecated.Method invocation conversion rules.static boolean
isSubtypeable(Class<?> parameter, Class<?> argument)
Deprecated.static boolean
isSubtypeable(JavaTypeDefinition parameter, ASTExpression argument)
Deprecated.static boolean
isSubtypeable(JavaTypeDefinition parameter, JavaTypeDefinition argument)
Deprecated.Subtypeability rules.static MethodType
parameterizeInvocation(JavaTypeDefinition context, Method method, ASTArgumentList argList)
Deprecated.static void
produceInitialBounds(Method method, JavaTypeDefinition context, List<Variable> variables, List<Bound> initialBounds)
Deprecated.static List<Constraint>
produceInitialConstraints(Method method, ASTArgumentList argList, List<Variable> variables)
Deprecated.static MethodType
selectAmongMaximallySpecific(MethodType first, MethodType second)
Deprecated.Select maximally specific method.static List<MethodType>
selectMethodsFirstPhase(JavaTypeDefinition context, List<MethodType> methodsToSearch, ASTArgumentList argList)
Deprecated.Look for methods be subtypeability.static List<MethodType>
selectMethodsSecondPhase(List<MethodType> methodsToSearch, ASTArgumentList argList)
Deprecated.Look for methods be method conversion.static List<MethodType>
selectMethodsThirdPhase(List<MethodType> methodsToSearch, ASTArgumentList argList)
Deprecated.Look for methods considering varargs as well.static MethodType
selectMostSpecificMethod(List<MethodType> selectedMethods)
Deprecated.Most specific method selection.
-
-
-
Method Detail
-
checkSubtypeability
public static boolean checkSubtypeability(MethodType method, MethodType subtypeableMethod)
Deprecated.
-
selectMethodsFirstPhase
public static List<MethodType> selectMethodsFirstPhase(JavaTypeDefinition context, List<MethodType> methodsToSearch, ASTArgumentList argList)
Deprecated.Look for methods be subtypeability. https://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.12.2.2
-
parameterizeInvocation
public static MethodType parameterizeInvocation(JavaTypeDefinition context, Method method, ASTArgumentList argList)
Deprecated.
-
produceInitialConstraints
public static List<Constraint> produceInitialConstraints(Method method, ASTArgumentList argList, List<Variable> variables)
Deprecated.
-
produceInitialBounds
public static void produceInitialBounds(Method method, JavaTypeDefinition context, List<Variable> variables, List<Bound> initialBounds)
Deprecated.
-
selectMethodsSecondPhase
public static List<MethodType> selectMethodsSecondPhase(List<MethodType> methodsToSearch, ASTArgumentList argList)
Deprecated.Look for methods be method conversion. https://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.12.2.3
-
selectMethodsThirdPhase
public static List<MethodType> selectMethodsThirdPhase(List<MethodType> methodsToSearch, ASTArgumentList argList)
Deprecated.Look for methods considering varargs as well. https://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.12.2.4
-
getBestMethodReturnType
public static JavaTypeDefinition getBestMethodReturnType(JavaTypeDefinition context, List<MethodType> methods, ASTArgumentList arguments)
Deprecated.Searches a list of methods by trying the three phases of method overload resolution. https://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.12.2
-
selectMostSpecificMethod
public static MethodType selectMostSpecificMethod(List<MethodType> selectedMethods)
Deprecated.Most specific method selection. https://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.12.2.5
-
selectAmongMaximallySpecific
public static MethodType selectAmongMaximallySpecific(MethodType first, MethodType second)
Deprecated.Select maximally specific method. https://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.12.2.5
-
getApplicableMethods
public static List<MethodType> getApplicableMethods(JavaTypeDefinition context, String methodName, List<JavaTypeDefinition> typeArguments, int argArity, Class<?> accessingClass)
Deprecated.Looks for potentially applicable methods in a given type definition.
-
getTypeDefOfMethod
public static MethodType getTypeDefOfMethod(JavaTypeDefinition context, Method method, List<JavaTypeDefinition> typeArguments)
Deprecated.
-
isMethodApplicable
public static boolean isMethodApplicable(Method method, String methodName, int argArity, Class<?> accessingClass, List<JavaTypeDefinition> typeArguments)
Deprecated.https://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.12.2.1 Potential applicability.
-
isMemberVisibleFromClass
public static boolean isMemberVisibleFromClass(Class<?> classWithMember, int modifiers, Class<?> accessingClass)
Deprecated.Given a class, the modifiers of on of it's member and the class that is trying to access that member, returns true is the member is accessible from the accessingClass Class.- Parameters:
classWithMember
- The Class with the member.modifiers
- The modifiers of that member.accessingClass
- The Class trying to access the member.- Returns:
- True if the member is visible from the accessingClass Class.
-
isGeneric
public static boolean isGeneric(Method method)
Deprecated.
-
isGeneric
public static boolean isGeneric(Class<?> clazz)
Deprecated.
-
getArity
public static int getArity(Method method)
Deprecated.
-
isMethodConvertible
public static boolean isMethodConvertible(JavaTypeDefinition parameter, ASTExpression argument)
Deprecated.
-
isMethodConvertible
public static boolean isMethodConvertible(JavaTypeDefinition parameter, JavaTypeDefinition argument)
Deprecated.Method invocation conversion rules. https://docs.oracle.com/javase/specs/jls/se7/html/jls-5.html#jls-5.3
-
isSubtypeable
public static boolean isSubtypeable(JavaTypeDefinition parameter, ASTExpression argument)
Deprecated.
-
isSubtypeable
public static boolean isSubtypeable(Class<?> parameter, Class<?> argument)
Deprecated.
-
isSubtypeable
public static boolean isSubtypeable(JavaTypeDefinition parameter, JavaTypeDefinition argument)
Deprecated.Subtypeability rules. https://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html#jls-4.10
-
boxPrimitive
public static JavaTypeDefinition boxPrimitive(JavaTypeDefinition def)
Deprecated.
-
getMethodExplicitTypeArugments
public static List<JavaTypeDefinition> getMethodExplicitTypeArugments(Node node)
Deprecated.
-
-