public final class ImageInfo extends Object
System.getProperty(String)
directly with the string literals defined here
thus eliminating the need to depend on this class.Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_IMAGE_CODE_KEY
Holds the string that is the name of the system property providing information about the
context in which code is currently executing.
|
static String |
PROPERTY_IMAGE_CODE_VALUE_BUILDTIME
Holds the string that will be returned by the system property for
ImageInfo.PROPERTY_IMAGE_CODE_KEY if code is executing in the context of image
building (e.g. |
static String |
PROPERTY_IMAGE_CODE_VALUE_RUNTIME
Holds the string that will be returned by the system property for
ImageInfo.PROPERTY_IMAGE_CODE_KEY if code is executing at image runtime. |
static String |
PROPERTY_IMAGE_KIND_KEY
Name of the system property that holds if this image is built as a shared library or an
executable.
|
static String |
PROPERTY_IMAGE_KIND_VALUE_EXECUTABLE
Holds the string that will be returned by the system property for
ImageInfo.PROPERTY_IMAGE_KIND_KEY if image is an executable. |
static String |
PROPERTY_IMAGE_KIND_VALUE_SHARED_LIBRARY
Holds the string that will be returned by the system property for
ImageInfo.PROPERTY_IMAGE_KIND_KEY if image is a shared library. |
Modifier and Type | Method and Description |
---|---|
static boolean |
inImageBuildtimeCode()
Returns true if (at the time of the call) code is executing in the context of image building
(e.g.
|
static boolean |
inImageCode()
Returns true if (at the time of the call) code is executing in the context of image building
or during image runtime, else false.
|
static boolean |
inImageRuntimeCode()
Returns true if (at the time of the call) code is executing at image runtime.
|
static boolean |
isExecutable()
Returns true if the image is build as an executable.
|
static boolean |
isSharedLibrary()
Returns true if the image is build as a shared library.
|
public static final String PROPERTY_IMAGE_CODE_KEY
ImageInfo.PROPERTY_IMAGE_CODE_VALUE_BUILDTIME
the code is executing in the context of image
building (e.g. in a static initializer of a class that will be contained in the image). If
the property returns the string given by ImageInfo.PROPERTY_IMAGE_CODE_VALUE_RUNTIME
the code
is executing at image runtime. Otherwise the property is not set.public static final String PROPERTY_IMAGE_CODE_VALUE_BUILDTIME
ImageInfo.PROPERTY_IMAGE_CODE_KEY
if code is executing in the context of image
building (e.g. in a static initializer of class that will be contained in the image).public static final String PROPERTY_IMAGE_CODE_VALUE_RUNTIME
ImageInfo.PROPERTY_IMAGE_CODE_KEY
if code is executing at image runtime.public static final String PROPERTY_IMAGE_KIND_KEY
ImageInfo.PROPERTY_IMAGE_KIND_VALUE_EXECUTABLE
the image is
built as an executable. If the property is ImageInfo.PROPERTY_IMAGE_KIND_VALUE_SHARED_LIBRARY
the image is built as a shared library.public static final String PROPERTY_IMAGE_KIND_VALUE_SHARED_LIBRARY
ImageInfo.PROPERTY_IMAGE_KIND_KEY
if image is a shared library.public static final String PROPERTY_IMAGE_KIND_VALUE_EXECUTABLE
ImageInfo.PROPERTY_IMAGE_KIND_KEY
if image is an executable.public static boolean inImageCode()
if (!ImageInfo.inImageCode()) { ... JVM specific code here ... }
public static boolean inImageRuntimeCode()
public static boolean inImageBuildtimeCode()
public static boolean isExecutable()
public static boolean isSharedLibrary()