private class ChainableReverseAbstractInterpreter.RestrictByOneTypeOfResultVisitor extends ChainableReverseAbstractInterpreter.RestrictByTypeOfResultVisitor
| Modifier and Type | Field and Description |
|---|---|
private boolean |
resultEqualsValue
true if the typeOf result is known to equal
value; false if it is known not to equal
value. |
private java.lang.String |
value
A value known to be equal or not equal to the result of the
typeOf operation. |
| Constructor and Description |
|---|
RestrictByOneTypeOfResultVisitor(java.lang.String value,
boolean resultEqualsValue) |
| Modifier and Type | Method and Description |
|---|---|
JSType |
caseBooleanType()
Boolean value type's case.
|
JSType |
caseFunctionType(FunctionType type)
Function type's case.
|
JSType |
caseNoObjectType()
Bottom Object type's case.
|
JSType |
caseNullType()
Null type's case.
|
JSType |
caseNumberType()
Number value type's case.
|
JSType |
caseObjectType(ObjectType type)
Object type's case.
|
JSType |
caseStringType()
String value type's case.
|
protected JSType |
caseTopType(JSType topType)
Abstracts away the similarities between visiting the unknown type and the
all type.
|
JSType |
caseVoidType()
Void type's case.
|
private boolean |
matchesExpectation(java.lang.String result)
Computes whether the given result of a
typeof operator matches
expectations, i.e. |
caseAllType, caseEnumElementType, caseNamedType, caseNoType, caseProxyObjectType, caseTemplateType, caseTemplatizedType, caseUnionType, caseUnknownTypeprivate final java.lang.String value
typeOf operation.private final boolean resultEqualsValue
true if the typeOf result is known to equal
value; false if it is known not to equal
value.RestrictByOneTypeOfResultVisitor(java.lang.String value,
boolean resultEqualsValue)
private boolean matchesExpectation(java.lang.String result)
typeof operator matches
expectations, i.e. whether a type that gives such a result should be
kept.protected JSType caseTopType(JSType topType)
ChainableReverseAbstractInterpreter.RestrictByTypeOfResultVisitorcaseTopType in class ChainableReverseAbstractInterpreter.RestrictByTypeOfResultVisitortopType - UNKNOWN_TYPE or ALL_TYPEChainableReverseAbstractInterpreter.RestrictByTypeOfResultVisitor.caseAllType(),
ChainableReverseAbstractInterpreter.RestrictByTypeOfResultVisitor.caseUnknownType()public JSType caseNoObjectType()
Visitorpublic JSType caseBooleanType()
Visitorpublic JSType caseFunctionType(FunctionType type)
Visitorpublic JSType caseNullType()
Visitorpublic JSType caseNumberType()
Visitorpublic JSType caseObjectType(ObjectType type)
Visitorpublic JSType caseStringType()
Visitor