public class SystemProperty
extends java.lang.Object
Example code:
if (SystemProperty.environment.value() == SystemProperty.Environment.Value.Production) {
// do something that's production-only
}
String version = SystemProperty.version.get();
| Modifier and Type | Class and Description |
|---|---|
static class |
SystemProperty.Environment
The current executing environment.
|
| Modifier and Type | Field and Description |
|---|---|
static SystemProperty |
applicationId
The application identifier for the current application.
|
static SystemProperty |
applicationVersion
The version identifier for the current application version.
|
static SystemProperty.Environment |
environment
The current executing environment.
|
static SystemProperty |
instanceReplicaId
Deprecated.
|
static SystemProperty |
version
The current executing runtime version.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
get()
Gets the value of the system property.
|
java.lang.String |
key()
The key for the system property.
|
void |
set(java.lang.String value)
Sets the value of the system property.
|
public static final SystemProperty.Environment environment
"com.google.appengine.runtime.environment".
Has the values "Production" and "Development".public static final SystemProperty version
"com.google.appengine.runtime.version".
A Version value is composed of period-separated integers, for example,
"1.2.8".public static final SystemProperty applicationId
"com.google.appengine.application.id".public static final SystemProperty applicationVersion
"com.google.appengine.application.version".@Deprecated public static final SystemProperty instanceReplicaId
ModulesService.getCurrentInstanceId()public java.lang.String key()
public java.lang.String get()
System.getProperty(key()).public void set(java.lang.String value)
System.setProperty(key(), value).