public enum TypeMatchingStrategy extends java.lang.Enum<TypeMatchingStrategy>
JSType
of nodes.Modifier and Type | Class and Description |
---|---|
static class |
TypeMatchingStrategy.MatchResult
The result of comparing two different
JSType instances. |
Enum Constant and Description |
---|
DEFAULT
Matches type or any subtype.
|
EXACT
Does not match subtypes.
|
STRICT_NULLABILITY
Matches type or any subtype.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
allowLooseMatches |
private boolean |
allowSubtypes |
private boolean |
ignoreNullability |
Modifier and Type | Method and Description |
---|---|
TypeMatchingStrategy.MatchResult |
match(JSType templateType,
JSType type) |
static TypeMatchingStrategy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static TypeMatchingStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TypeMatchingStrategy DEFAULT
public static final TypeMatchingStrategy STRICT_NULLABILITY
public static final TypeMatchingStrategy EXACT
private final boolean allowSubtypes
private final boolean ignoreNullability
private final boolean allowLooseMatches
public static TypeMatchingStrategy[] values()
for (TypeMatchingStrategy c : TypeMatchingStrategy.values()) System.out.println(c);
public static TypeMatchingStrategy valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic TypeMatchingStrategy.MatchResult match(JSType templateType, JSType type)