public class Limits
extends java.lang.Object
limits.c in the same
directory as this interface and run the resulting executable while
piping standard output to Limits.java.
The rank for pointer difference, sizeof, and wide character types
reflects the ordering char, short,
int, long, and long long,
starting at 1 and ignoring the sign. This program requires that the
__PTRDIFF_TYPE__, __SIZE_TYPE__, and
__WCHAR_TYPE__ preprocessor macros are defined.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ARCH
The processor architecture.
|
static java.math.BigInteger |
ARRAY_MAX
The maximum size of fixed size arrays.
|
static int |
BOOL_ALIGN
The alignment of boolean types.
|
static int |
BOOL_NAT_ALIGN
The natural alignment of boolean types.
|
static int |
BOOL_SIZE
The size of boolean types.
|
static int |
CHAR_BITS
The bit width of char types.
|
static java.math.BigInteger |
CHAR_MAX
The maximum value of signed char types.
|
static java.math.BigInteger |
CHAR_MIN
The minimum value of signed char types.
|
static java.lang.String |
COMPILER_NAME
The name of the C compiler.
|
static java.lang.String |
COMPILER_VERSION
The C compiler version.
|
static int |
COMPILER_VERSION_MAJOR
The major C compiler version.
|
static int |
COMPILER_VERSION_MINOR
The minor C compiler version.
|
static int |
DOUBLE_ALIGN
The alignment of double types.
|
static int |
DOUBLE_NAT_ALIGN
The natural alignment of double types.
|
static int |
DOUBLE_SIZE
The size of double types.
|
static int |
FLOAT_ALIGN
The alignment of float types.
|
static int |
FLOAT_NAT_ALIGN
The natural alignment of float types.
|
static int |
FLOAT_SIZE
The size of float types.
|
static int |
FUNCTION_ALIGN
The alignment of function types.
|
static int |
FUNCTION_SIZE
The size of function types.
|
static int |
INT_ALIGN
The alignment of int types.
|
static java.math.BigInteger |
INT_MAX
The maximum value of signed int types.
|
static java.math.BigInteger |
INT_MIN
The minimum value of signed int types.
|
static int |
INT_NAT_ALIGN
The natural alignment of int types.
|
static int |
INT_SIZE
The size of int types.
|
static boolean |
IS_BIG_ENDIAN
The flag for whether the machine is big endian.
|
static boolean |
IS_CHAR_SIGNED
The flag for whether
char is signed. |
static boolean |
IS_ELF
The flag for the ELF object format.
|
static boolean |
IS_INT_SIGNED
The flag for whether
int is signed in bit-fields. |
static boolean |
IS_STRING_CONST
The flag for whether string literals consist of
const char elements. |
static boolean |
IS_WCHAR_SIGNED
The flag for whether
wchar_t is signed. |
static int |
LONG_ALIGN
The alignment of long types.
|
static int |
LONG_DOUBLE_ALIGN
The alignment of long double types.
|
static int |
LONG_DOUBLE_NAT_ALIGN
The natural alignment of long double types.
|
static int |
LONG_DOUBLE_SIZE
The size of long double types.
|
static int |
LONG_LONG_ALIGN
The alignment of long long types.
|
static java.math.BigInteger |
LONG_LONG_MAX
The maximum value of signed long long types.
|
static java.math.BigInteger |
LONG_LONG_MIN
The minimum value of signed long long types.
|
static int |
LONG_LONG_NAT_ALIGN
The natural alignment of long long types.
|
static int |
LONG_LONG_SIZE
The size of long long types.
|
static java.math.BigInteger |
LONG_MAX
The maximum value of signed long types.
|
static java.math.BigInteger |
LONG_MIN
The minimum value of signed long types.
|
static int |
LONG_NAT_ALIGN
The natural alignment of long types.
|
static int |
LONG_SIZE
The size of long types.
|
static java.lang.String |
OS
The name and version of the operating system.
|
static int |
POINTER_ALIGN
The alignment of pointer types.
|
static int |
POINTER_NAT_ALIGN
The natural alignment of pointer types.
|
static int |
POINTER_SIZE
The size of pointer types.
|
static int |
PTRDIFF_RANK
The rank of pointer difference types.
|
static int |
PTRDIFF_SIZE
The size of pointer difference types.
|
static int |
SHORT_ALIGN
The alignment of short types.
|
static java.math.BigInteger |
SHORT_MAX
The maximum value of signed short types.
|
static java.math.BigInteger |
SHORT_MIN
The minimum value of signed short types.
|
static int |
SHORT_NAT_ALIGN
The natural alignment of short types.
|
static int |
SHORT_SIZE
The size of short types.
|
static int |
SIZEOF_RANK
The rank of sizeof expressions.
|
static int |
SIZEOF_SIZE
The size of sizeof expressions.
|
static java.math.BigInteger |
UCHAR_MAX
The maximum value of unsigned char types.
|
static java.math.BigInteger |
UINT_MAX
The maximum value of unsigned int types.
|
static java.math.BigInteger |
ULONG_LONG_MAX
The maximum value of unsigned long long types.
|
static java.math.BigInteger |
ULONG_MAX
The maximum value of unsigned long types.
|
static java.math.BigInteger |
USHORT_MAX
The maximum value of unsigned short types.
|
static int |
VOID_ALIGN
The alignment of void types.
|
static int |
VOID_SIZE
The size of void types.
|
static int |
WCHAR_RANK
The rank of wide character types.
|
static int |
WCHAR_SIZE
The size of wide char types.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
fitsChar(java.math.BigInteger value)
Determine whether the specified value fits into a char.
|
static boolean |
fitsInt(java.math.BigInteger value)
Determine whether the specified value fits into an int.
|
static boolean |
fitsLong(java.math.BigInteger value)
Determine whether the specified value fits into a long.
|
static boolean |
fitsLongLong(java.math.BigInteger value)
Determine whether the specified value fits into a long long.
|
static boolean |
fitsShort(java.math.BigInteger value)
Determine whether the specified value fits into a short.
|
static boolean |
fitsUnsignedChar(java.math.BigInteger value)
Determine whether the specified value fits into an unsigned
char.
|
static boolean |
fitsUnsignedInt(java.math.BigInteger value)
Determine whether the specified value fits into an unsigned
int.
|
static boolean |
fitsUnsignedLong(java.math.BigInteger value)
Determine whether the specified value fits into an unsigned
long.
|
static boolean |
fitsUnsignedLongLong(java.math.BigInteger value)
Determine whether the specified value fits into an unsigned
long long.
|
static boolean |
fitsUnsignedShort(java.math.BigInteger value)
Determine whether the specified value fits into an unsigned
short.
|
static java.math.BigInteger |
maskAsInt(java.math.BigInteger value)
Mask the specified value as a signed int.
|
static java.math.BigInteger |
maskAsLong(java.math.BigInteger value)
Mask the specified value as a signed long.
|
static java.math.BigInteger |
maskAsLongLong(java.math.BigInteger value)
Mask the specified value as a signed long long.
|
static java.math.BigInteger |
maskAsShort(java.math.BigInteger value)
Mask the specified value as a signed short.
|
static java.math.BigInteger |
maskAsSignedChar(java.math.BigInteger value)
Mask the specified value as a signed char.
|
static java.math.BigInteger |
maskAsUnsignedChar(java.math.BigInteger value)
Mask the specified value as an unsigned char.
|
static java.math.BigInteger |
maskAsUnsignedInt(java.math.BigInteger value)
Mask the specified value as an unsigned int.
|
static java.math.BigInteger |
maskAsUnsignedLong(java.math.BigInteger value)
Mask the specified value as an unsigned long.
|
static java.math.BigInteger |
maskAsUnsignedLongLong(java.math.BigInteger value)
Mask the specified value as an unsigned long long.
|
static java.math.BigInteger |
maskAsUnsignedShort(java.math.BigInteger value)
Mask the specified value as an unsigned short.
|
static long |
toWidth(long size)
Convert the specified size to the corresponding bit width.
|
public static final java.lang.String OS
public static final java.lang.String ARCH
public static final boolean IS_ELF
public static final java.lang.String COMPILER_NAME
public static final java.lang.String COMPILER_VERSION
public static final int COMPILER_VERSION_MAJOR
public static final int COMPILER_VERSION_MINOR
public static final boolean IS_BIG_ENDIAN
public static final int VOID_SIZE
public static final int VOID_ALIGN
public static final int FUNCTION_SIZE
public static final int FUNCTION_ALIGN
public static final int POINTER_SIZE
public static final int POINTER_ALIGN
public static final int POINTER_NAT_ALIGN
public static final int PTRDIFF_SIZE
public static final int PTRDIFF_RANK
public static final int SIZEOF_SIZE
public static final int SIZEOF_RANK
public static final java.math.BigInteger ARRAY_MAX
public static final int BOOL_SIZE
public static final int BOOL_ALIGN
public static final int BOOL_NAT_ALIGN
public static final boolean IS_CHAR_SIGNED
char is signed.public static final int CHAR_BITS
public static final java.math.BigInteger CHAR_MIN
public static final java.math.BigInteger CHAR_MAX
public static final java.math.BigInteger UCHAR_MAX
public static final boolean IS_WCHAR_SIGNED
wchar_t is signed.public static final int WCHAR_SIZE
public static final int WCHAR_RANK
public static final boolean IS_STRING_CONST
const char elements.public static final int SHORT_SIZE
public static final int SHORT_ALIGN
public static final int SHORT_NAT_ALIGN
public static final java.math.BigInteger SHORT_MIN
public static final java.math.BigInteger SHORT_MAX
public static final java.math.BigInteger USHORT_MAX
public static final boolean IS_INT_SIGNED
int is signed in bit-fields.public static final int INT_SIZE
public static final int INT_ALIGN
public static final int INT_NAT_ALIGN
public static final java.math.BigInteger INT_MIN
public static final java.math.BigInteger INT_MAX
public static final java.math.BigInteger UINT_MAX
public static final int LONG_SIZE
public static final int LONG_ALIGN
public static final int LONG_NAT_ALIGN
public static final java.math.BigInteger LONG_MIN
public static final java.math.BigInteger LONG_MAX
public static final java.math.BigInteger ULONG_MAX
public static final int LONG_LONG_SIZE
public static final int LONG_LONG_ALIGN
public static final int LONG_LONG_NAT_ALIGN
public static final java.math.BigInteger LONG_LONG_MIN
public static final java.math.BigInteger LONG_LONG_MAX
public static final java.math.BigInteger ULONG_LONG_MAX
public static final int FLOAT_SIZE
public static final int FLOAT_ALIGN
public static final int FLOAT_NAT_ALIGN
public static final int DOUBLE_SIZE
public static final int DOUBLE_ALIGN
public static final int DOUBLE_NAT_ALIGN
public static final int LONG_DOUBLE_SIZE
public static final int LONG_DOUBLE_ALIGN
public static final int LONG_DOUBLE_NAT_ALIGN
public static long toWidth(long size)
size - The size.public static boolean fitsChar(java.math.BigInteger value)
value - The value.true if the value fits into a char.public static boolean fitsUnsignedChar(java.math.BigInteger value)
value - The value.true if the value fits into an unsigned
char.public static boolean fitsShort(java.math.BigInteger value)
value - The value.true if the value fits into a short.public static boolean fitsUnsignedShort(java.math.BigInteger value)
value - The value.true if the value fits into an unsigned
short.public static boolean fitsInt(java.math.BigInteger value)
value - The value.true if the value fits into an int.public static boolean fitsUnsignedInt(java.math.BigInteger value)
value - The value.true if the value fits into an unsigned
int.public static boolean fitsLong(java.math.BigInteger value)
value - The value.true if the value fits into a long.public static boolean fitsUnsignedLong(java.math.BigInteger value)
value - The value.true if the value fits into an unsigned
long.public static boolean fitsLongLong(java.math.BigInteger value)
value - The value.true if the value fits into a long long.public static boolean fitsUnsignedLongLong(java.math.BigInteger value)
value - The value.true if the value fits into an unsigned
long long.public static java.math.BigInteger maskAsSignedChar(java.math.BigInteger value)
value - The value.public static java.math.BigInteger maskAsUnsignedChar(java.math.BigInteger value)
value - The value.public static java.math.BigInteger maskAsShort(java.math.BigInteger value)
value - The value.public static java.math.BigInteger maskAsUnsignedShort(java.math.BigInteger value)
value - The value.public static java.math.BigInteger maskAsInt(java.math.BigInteger value)
value - The value.public static java.math.BigInteger maskAsUnsignedInt(java.math.BigInteger value)
value - The value.public static java.math.BigInteger maskAsLong(java.math.BigInteger value)
value - The value.public static java.math.BigInteger maskAsUnsignedLong(java.math.BigInteger value)
value - The value.public static java.math.BigInteger maskAsLongLong(java.math.BigInteger value)
value - The value.public static java.math.BigInteger maskAsUnsignedLongLong(java.math.BigInteger value)
value - The value.Copyright © 2014. All Rights Reserved.