|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.codehaus.groovy.transform.stc.StaticTypeCheckingSupport
public abstract class StaticTypeCheckingSupport
Static support methods for StaticTypeCheckingVisitor.
| Constructor Summary | |
|---|---|
StaticTypeCheckingSupport()
|
|
| Method Summary | |
|---|---|
static int |
allParametersAndArgumentsMatch(Parameter[] params,
ClassNode[] args)
Checks that arguments and parameter types match. |
static boolean |
checkCompatibleAssignmentTypes(ClassNode left,
ClassNode right)
Returns true or false depending on whether the right classnode can be assigned to the left classnode. |
static boolean |
checkCompatibleAssignmentTypes(ClassNode left,
ClassNode right,
Expression rightExpression)
|
static java.util.List<MethodNode> |
chooseBestMethod(ClassNode receiver,
java.util.Collection<MethodNode> methods,
ClassNode... args)
Given a list of candidate methods, returns the one which best matches the argument types |
static java.util.List<MethodNode> |
findDGMMethodsByNameAndArguments(ClassNode receiver,
java.lang.String name,
ClassNode[] args)
|
static java.util.List<MethodNode> |
findDGMMethodsByNameAndArguments(ClassNode receiver,
java.lang.String name,
ClassNode[] args,
java.util.List<MethodNode> methods)
|
static boolean |
implementsInterfaceOrIsSubclassOf(ClassNode type,
ClassNode superOrInterface)
|
static boolean |
isAssignment(int op)
|
static boolean |
isBeingCompiled(ClassNode node)
|
static boolean |
isGStringOrGStringStringLUB(ClassNode node)
|
static boolean |
isParameterizedWithGStringOrGStringString(ClassNode node)
|
static boolean |
isParameterizedWithString(ClassNode node)
|
static boolean |
isWithCall(java.lang.String name,
Expression callArguments)
Called on method call checks in order to determine if a method call corresponds to the idiomatic o.with { ... } structure |
static boolean |
missesGenericsTypes(ClassNode cn)
|
static Parameter[] |
parameterizeArguments(ClassNode receiver,
MethodNode m)
Given a receiver and a method node, parameterize the method arguments using available generic type information. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StaticTypeCheckingSupport()
| Method Detail |
|---|
public static boolean isWithCall(java.lang.String name,
Expression callArguments)
name - name of the method calledcallArguments - arguments of the method
public static int allParametersAndArgumentsMatch(Parameter[] params,
ClassNode[] args)
params - method parametersargs - type arguments
public static boolean isAssignment(int op)
public static boolean checkCompatibleAssignmentTypes(ClassNode left,
ClassNode right)
left - the class to be assigned toright - the assignee class
public static boolean checkCompatibleAssignmentTypes(ClassNode left,
ClassNode right,
Expression rightExpression)
public static boolean isBeingCompiled(ClassNode node)
public static boolean implementsInterfaceOrIsSubclassOf(ClassNode type,
ClassNode superOrInterface)
public static java.util.List<MethodNode> findDGMMethodsByNameAndArguments(ClassNode receiver,
java.lang.String name,
ClassNode[] args)
public static java.util.List<MethodNode> findDGMMethodsByNameAndArguments(ClassNode receiver,
java.lang.String name,
ClassNode[] args,
java.util.List<MethodNode> methods)
public static java.util.List<MethodNode> chooseBestMethod(ClassNode receiver,
java.util.Collection<MethodNode> methods,
ClassNode... args)
receiver - methods - candidate methodsargs - argument types
public static Parameter[] parameterizeArguments(ClassNode receiver,
MethodNode m)
receiver - the classm - the method
public static boolean isGStringOrGStringStringLUB(ClassNode node)
public static boolean isParameterizedWithGStringOrGStringString(ClassNode node)
node - the node to be tested
public static boolean isParameterizedWithString(ClassNode node)
node - the node to be tested
public static boolean missesGenericsTypes(ClassNode cn)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||