public enum EEssentialType extends java.lang.Enum<EEssentialType>
Enum Constant and Description |
---|
BOOL |
CHAR |
DOUBLE |
FLOAT |
LONG_DOUBLE |
NAMED_ENUM
All instances of NAMED_ENUM are considered different (MISRA C2012 D.5).
|
SIGNED_CHAR |
SIGNED_INT |
SIGNED_LONG |
SIGNED_LONG_LONG |
SIGNED_SHORT |
UNSIGNED_CHAR |
UNSIGNED_INT |
UNSIGNED_LONG |
UNSIGNED_LONG_LONG |
UNSIGNED_SHORT |
Modifier and Type | Method and Description |
---|---|
static java.util.Optional<EEssentialType> |
fromClangResolvedType(eu.cqse.clang.CXType resolvedType)
Returns the
EEssentialType of the given CXType . |
EEssentialTypeCategory |
getCategory()
Category of this essential type (defined in Misra C:2012)
|
static java.util.Optional<EEssentialType> |
getEssentialTypeOfCursor(eu.cqse.clang.CXCursor cursor)
Determines the essential type of the given Cursor.
|
static EEssentialType |
getHighestRankType(EEssentialType type1,
EEssentialType type2)
Returns the highest-ranking type (and widest) of the given types.
|
boolean |
isWiderThan(EEssentialType other)
Returns whether this essential type is wider (needs more bits to be stored)
than the given type.
|
static EEssentialType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static EEssentialType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EEssentialType BOOL
public static final EEssentialType CHAR
public static final EEssentialType SIGNED_CHAR
public static final EEssentialType SIGNED_SHORT
public static final EEssentialType SIGNED_INT
public static final EEssentialType SIGNED_LONG
public static final EEssentialType SIGNED_LONG_LONG
public static final EEssentialType UNSIGNED_CHAR
public static final EEssentialType UNSIGNED_SHORT
public static final EEssentialType UNSIGNED_INT
public static final EEssentialType UNSIGNED_LONG
public static final EEssentialType UNSIGNED_LONG_LONG
public static final EEssentialType NAMED_ENUM
public static final EEssentialType FLOAT
public static final EEssentialType DOUBLE
public static final EEssentialType LONG_DOUBLE
public static EEssentialType[] values()
for (EEssentialType c : EEssentialType.values()) System.out.println(c);
public static EEssentialType 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 static EEssentialType getHighestRankType(EEssentialType type1, EEssentialType type2)
public static java.util.Optional<EEssentialType> getEssentialTypeOfCursor(eu.cqse.clang.CXCursor cursor)
This implementation is based on Section D of Misra C2012.
public static java.util.Optional<EEssentialType> fromClangResolvedType(eu.cqse.clang.CXType resolvedType)
EEssentialType
of the given CXType
. This can't be
done with valueOf(String)
since we can't be sure that types in Clang
are named identical to the essential-type names in Misra.public boolean isWiderThan(EEssentialType other)
public EEssentialTypeCategory getCategory()