public final class ConformanceFlags
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BOXING
If boxing conversion was necessary, this bit is set.
|
static int |
CHECK_RESULTS
Flags that describe the result of a checked conformance, which can be
one of
INCOMPATIBLE , SUCCESS , LAMBDA_RAW_COMPATIBLE , or LAMBDA_PARAMETER_COMPATIBLE . |
static int |
CHECKED
Conformance has been checked.
|
static int |
CHECKED_SUCCESS
Default flags to announce a successfully checked conformance.
|
static int |
DEMAND_CONVERSION
If the result has this bit set, a demand conversion had to be applied to make both types compatible.
|
static int |
EXPLICIT_VOID_RETURN
Used to indicate an explicit void return value
|
static int |
INCOMPATIBLE
Indicates incompatibility.
|
static int |
LAMBDA_PARAMETER_COMPATIBLE
Lambda expression is compatible to its expectation by its parameter types but not by its result.
|
static int |
LAMBDA_RAW_COMPATIBLE
Lambda expression is raw compatible to its expectation.
|
static int |
LAMBDA_VOID_COMPATIBLE
A lambda's last expression has a non-void implicit type but void was expected.
|
static int |
MERGED
Flags have been merged from various sources.
|
static int |
NO_IMPLICIT_RETURN
Indicates that the announced type is not an implicit return type.
|
static int |
NONE
No flags given.
|
static int |
PREFERRED_LAMBDA_SUGAR
A method is overloaded with various function interfaces.
|
static int |
PRIMITIVE_WIDENING
This is set if primitive widening had to be applied.
|
static int |
PROPAGATED_TYPE
Indicates that the type of this expression is derived from a child which can provide better conformance
information.
|
static int |
RAW_TYPE
Indicates that the types have been checked as if they were raw types.
|
static int |
RAW_TYPE_CONVERSION
This is set if the conformance was possible due to raw type conversion.
|
static int |
SEALED
Conformance has been checked and the result was sealed.
|
static int |
SUBTYPE
Indicates that both types are in a subtype relationship.
|
static int |
SUCCESS
This bit indicates a successful check for conformance.
|
static int |
SYNONYM
If a synonym conversion was necessary, this bit is set in the result value.
|
static int |
THROWN_EXCEPTION
Indicates that the expression will definitely throw an exception.
|
static int |
UNBOXING
If unboxing conversion was necessary, this bit is set.
|
static int |
UNCHECKED
Conformance was not yet checked.
|
static int |
UNKNOWN_TYPE_PARTICIPATED
Two types are considered compatible if one of the participants is the unknown type.
|
static int |
VAR_ARG
Used to indicate a necessary var arg conversion, e.g an expression will be wrapped into an array by the compiler.
|
Modifier and Type | Method and Description |
---|---|
static int |
compareFlags(int left,
int right)
Simple comparison of two flags.
|
static boolean |
sanityCheck(int flags)
Simple sanity check for the given flags.
|
static java.lang.String |
toString(int flags)
Prints the names of the set bits as a list, e.g.
|
public static final int NONE
public static final int RAW_TYPE
public static final int SUCCESS
public static final int DEMAND_CONVERSION
SYNONYM
may require a demand conversion.public static final int SUBTYPE
public static final int PRIMITIVE_WIDENING
public static final int UNBOXING
public static final int BOXING
public static final int RAW_TYPE_CONVERSION
public static final int SYNONYM
public static final int UNKNOWN_TYPE_PARTICIPATED
public static final int INCOMPATIBLE
public static final int VAR_ARG
public static final int CHECKED
public static final int SEALED
public static final int UNCHECKED
public static final int LAMBDA_RAW_COMPATIBLE
public static final int LAMBDA_PARAMETER_COMPATIBLE
public static final int MERGED
public static final int NO_IMPLICIT_RETURN
public static final int EXPLICIT_VOID_RETURN
public static final int PROPAGATED_TYPE
public static final int THROWN_EXCEPTION
public static final int PREFERRED_LAMBDA_SUGAR
public static final int LAMBDA_VOID_COMPATIBLE
public static final int CHECKED_SUCCESS
public static final int CHECK_RESULTS
INCOMPATIBLE
, SUCCESS
, LAMBDA_RAW_COMPATIBLE
, or LAMBDA_PARAMETER_COMPATIBLE
.public static int compareFlags(int left, int right)
-1
for the left, 1
for the right or 0
if undecided.public static java.lang.String toString(int flags)
[CHECKED, SUCCESS]
.public static boolean sanityCheck(int flags)
true
such that it can be used in Java assertions.
Will throw an IllegalArgumentException
if the flags appear to be bogus.