Package org.checkerframework.javacutil
Enum TypeKindUtils.PrimitiveConversionKind
- java.lang.Object
-
- java.lang.Enum<TypeKindUtils.PrimitiveConversionKind>
-
- org.checkerframework.javacutil.TypeKindUtils.PrimitiveConversionKind
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TypeKindUtils.PrimitiveConversionKind>
- Enclosing class:
- TypeKindUtils
public static enum TypeKindUtils.PrimitiveConversionKind extends java.lang.Enum<TypeKindUtils.PrimitiveConversionKind>
The type of primitive conversion: narrowing, widening, or same.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TypeKindUtils.PrimitiveConversionKind
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TypeKindUtils.PrimitiveConversionKind[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SAME
public static final TypeKindUtils.PrimitiveConversionKind SAME
The two primitive kinds are the same.
-
WIDENING
public static final TypeKindUtils.PrimitiveConversionKind WIDENING
The conversion is a widening primitive conversion.This includes byte to char, even though that is strictly a "widening and narrowing primitive conversion", according to JLS 5.1.4.
-
NARROWING
public static final TypeKindUtils.PrimitiveConversionKind NARROWING
The conversion is a narrowing primitive conversion.
-
-
Method Detail
-
values
public static TypeKindUtils.PrimitiveConversionKind[] 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 (TypeKindUtils.PrimitiveConversionKind c : TypeKindUtils.PrimitiveConversionKind.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TypeKindUtils.PrimitiveConversionKind 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
-
-