Enum ConformanceHint
- java.lang.Object
-
- java.lang.Enum<ConformanceHint>
-
- org.eclipse.xtext.xbase.typesystem.conformance.ConformanceHint
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ConformanceHint>
public enum ConformanceHint extends java.lang.Enum<ConformanceHint>
Enum to work with a type safe represenation of theConformanceFlags. Internally the flags are used but clients may decide to usefromFlags(int)ortoFlags(EnumSet)to work with the strongly typed representation.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOXINGCHECKEDDEMAND_CONVERSIONEXCEPTIONEXPLICIT_VOID_RETURNUsed to indicate an explicit void return valueINCOMPATIBLELAMBDA_PARAMETER_COMPATIBLELAMBDA_RAW_COMPATIBLELAMBDA_VOID_COMPATIBLEMERGEDNO_IMPLICIT_RETURNIndicates that the announced type is not an implicit return type.PREFERRED_LAMBDA_SUGARA method is overloaded with various function interfaces.PRIMITIVE_WIDENINGPROPAGATED_TYPEIndicates that the type of this expression is derived from a child which can provide better conformance information.RAWRAWTYPE_CONVERSIONSEALEDSUBTYPESUCCESSSYNONYMTHROWN_EXCEPTIONIndicates that the expression will definitely throw an exception.UNBOXINGUNCHECKEDUNKNOWN_TYPE_PARTICIPATEDTwo types are considered compatible if one of the participants is the unknown type.VAR_ARG
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.EnumSet<ConformanceHint>fromFlags(int flags)static inttoFlags(java.util.EnumSet<ConformanceHint> hints)static inttoFlags(ConformanceHint... hints)static ConformanceHintvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ConformanceHint[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SUCCESS
public static final ConformanceHint SUCCESS
-
INCOMPATIBLE
public static final ConformanceHint INCOMPATIBLE
-
EXCEPTION
public static final ConformanceHint EXCEPTION
-
SUBTYPE
public static final ConformanceHint SUBTYPE
-
PRIMITIVE_WIDENING
public static final ConformanceHint PRIMITIVE_WIDENING
-
BOXING
public static final ConformanceHint BOXING
-
UNBOXING
public static final ConformanceHint UNBOXING
-
RAWTYPE_CONVERSION
public static final ConformanceHint RAWTYPE_CONVERSION
-
DEMAND_CONVERSION
public static final ConformanceHint DEMAND_CONVERSION
-
SYNONYM
public static final ConformanceHint SYNONYM
-
VAR_ARG
public static final ConformanceHint VAR_ARG
-
CHECKED
public static final ConformanceHint CHECKED
-
SEALED
public static final ConformanceHint SEALED
-
UNCHECKED
public static final ConformanceHint UNCHECKED
-
RAW
public static final ConformanceHint RAW
-
LAMBDA_RAW_COMPATIBLE
public static final ConformanceHint LAMBDA_RAW_COMPATIBLE
-
LAMBDA_VOID_COMPATIBLE
public static final ConformanceHint LAMBDA_VOID_COMPATIBLE
-
LAMBDA_PARAMETER_COMPATIBLE
public static final ConformanceHint LAMBDA_PARAMETER_COMPATIBLE
-
MERGED
public static final ConformanceHint MERGED
-
NO_IMPLICIT_RETURN
public static final ConformanceHint NO_IMPLICIT_RETURN
Indicates that the announced type is not an implicit return type. E.g. the type of a return expression is 'void' but this is not the implicit return type of the return expression itself. The return type was computed properly from the children of the return expression.
-
EXPLICIT_VOID_RETURN
public static final ConformanceHint EXPLICIT_VOID_RETURN
Used to indicate an explicit void return value
-
PROPAGATED_TYPE
public static final ConformanceHint PROPAGATED_TYPE
Indicates that the type of this expression is derived from a child which can provide better conformance information.
-
THROWN_EXCEPTION
public static final ConformanceHint THROWN_EXCEPTION
Indicates that the expression will definitely throw an exception.
-
UNKNOWN_TYPE_PARTICIPATED
public static final ConformanceHint UNKNOWN_TYPE_PARTICIPATED
Two types are considered compatible if one of the participants is the unknown type. This flag indicates this situation.
-
PREFERRED_LAMBDA_SUGAR
public static final ConformanceHint PREFERRED_LAMBDA_SUGAR
A method is overloaded with various function interfaces. The variant with a single-arg lambda is the prefered sugar version.
-
-
Method Detail
-
values
public static ConformanceHint[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ConformanceHint c : ConformanceHint.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ConformanceHint valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
toFlags
public static int toFlags(ConformanceHint... hints)
-
toFlags
public static int toFlags(java.util.EnumSet<ConformanceHint> hints)
-
fromFlags
public static java.util.EnumSet<ConformanceHint> fromFlags(int flags)
-
-