Package gw.lang.parser.expressions
Enum Variance
- All Implemented Interfaces:
Serializable
,Comparable<Variance>
,java.lang.constant.Constable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
static interface
private static class
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptioninternal use: variance inferenceinternal use: Java interopinternal use: Java interop -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDesc()
char
private static Variance
getVariance
(ITypeVariableType type) private static void
inferVariance
(IType genericType, Map<String, Variance> map) private static Variance
invertVariance
(Variance variance) private static boolean
isTypeVarFromEnclosingType
(IType enclosingType, ITypeVariableType typeVar) static Variance
maybeInferVariance
(IType type, IGenericTypeVariable gtv) static Variance
Returns the enum constant of this type with the specified name.static Variance[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.private static boolean
static void
verifyDefaultTypeVarVariance
(IType enclosingType, Variance ctxVariance, IType... types) static void
verifyTypeVarVariance
(Variance variance, IType enclosingType, Variance.IVarianceVerifier verifier, IType type)
-
Enum Constant Details
-
COVARIANT
-
CONTRAVARIANT
-
INVARIANT
-
DEFAULT
-
PENDING
internal use: variance inference -
WILD_COVARIANT
internal use: Java interop -
WILD_CONTRAVARIANT
internal use: Java interop
-
-
Field Details
-
SUPPORT_DEFAULT_VARIANCE_CHECKING
private static final boolean SUPPORT_DEFAULT_VARIANCE_CHECKING- See Also:
-
DEFAULT_VARIANCE_MAP
-
_desc
-
_sign
private final char _sign
-
-
Constructor Details
-
Variance
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getDesc
-
getSymbol
public char getSymbol() -
verifyTypeVarVariance
public static void verifyTypeVarVariance(Variance variance, IType enclosingType, Variance.IVarianceVerifier verifier, IType type) -
getVariance
-
maybeInferVariance
-
isTypeVarFromEnclosingType
-
inferVariance
-
verifyDefaultForVariance
-
verifyDefaultTypeVarVariance
-
invertVariance
-