private static class ConformanceRules.ConformanceUtil
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
private |
ConformanceUtil() |
Modifier and Type | Method and Description |
---|---|
(package private) static JSType |
evaluateTypeString(AbstractCompiler compiler,
java.lang.String expression) |
(package private) static JSType |
getJSType(AbstractCompiler compiler,
Node n)
This method gets the JSType from the Node argument and verifies that it is
present.
|
(package private) static JSType |
getNativeType(AbstractCompiler compiler,
JSTypeNative typeId) |
(package private) static boolean |
isCallTarget(Node n) |
(package private) static boolean |
validateCall(AbstractCompiler compiler,
Node callOrNew,
FunctionType functionType,
boolean isCallInvocation)
Validate the parameters and the 'this' type, of a new or call.
|
(package private) static boolean |
validateParameter(JSType argType,
JSType paramType)
Expect that the type of an argument matches the type of the parameter
that it's fulfilling.
|
private static boolean |
validateParameterList(AbstractCompiler compiler,
Node callOrNew,
FunctionType functionType,
boolean isCallInvocation) |
private static boolean |
validateThis(Node callOrNew,
FunctionType functionType,
boolean isCallInvocation) |
static boolean isCallTarget(Node n)
static JSType evaluateTypeString(AbstractCompiler compiler, java.lang.String expression) throws InvalidRequirementSpec
InvalidRequirementSpec
static boolean validateCall(AbstractCompiler compiler, Node callOrNew, FunctionType functionType, boolean isCallInvocation)
private static boolean validateThis(Node callOrNew, FunctionType functionType, boolean isCallInvocation)
private static boolean validateParameterList(AbstractCompiler compiler, Node callOrNew, FunctionType functionType, boolean isCallInvocation)
static boolean validateParameter(JSType argType, JSType paramType)
argType
- The type of the argument.paramType
- The type of the parameter.static JSType getJSType(AbstractCompiler compiler, Node n)
static JSType getNativeType(AbstractCompiler compiler, JSTypeNative typeId)