public enum EnvironmentProperty extends Enum<EnvironmentProperty> implements org.refcodes.mixin.KeyAccessor<String>, org.refcodes.mixin.ValueAccessor.ValueProperty<String>
EnvironmentProperty
for retrieving some common environment variables
with ease.Enum Constant and Description |
---|
COMPUTERNAME
The environment variable (on windows) holding the computer's name.
|
CONSOLE_ANSI
Set to "true" or "false", forces ANSI to be used / not used by
REFCODES.ORG artifacts, no matter what capabilities were detected for the
hosting terminal.
|
CONSOLE_HEIGHT
Stands for the lines per column to be taken by REFCODES.ORG artifacts.
|
CONSOLE_LINE_BREAK
The console's line-break property.
|
CONSOLE_WIDTH
Stands for the chars per row to be taken by REFCODES.ORG artifacts.
|
HTTP_PROXY |
HTTPS_PROXY |
LOGGER_LAYOUT
Stands for the chosen layout for the REFCODES.ORG logger artifacts.
|
LOGGER_STYLE
Stands for the chosen style for the REFCODES.ORG logger artifacts.
|
NO_PROXY |
TERM
Environment variable holding the current session's terminal.
|
TERMINAL_HEIGHT
The console height environment variable.
|
TERMINAL_WIDTH
The console width environment variable on *ix like shells.
|
USER_HOME
Environment variable holding the user's home folder path.
|
Modifier and Type | Method and Description |
---|---|
String |
getKey()
Gets the key.
|
String |
getValue()
Retrieves the value, first the upper-case variant of the environment
variable is tried out.
|
void |
setValue(String aValue)
Retrieves the value, first the upper-case variant of the environment
variable is tried out.
|
static EnvironmentProperty |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EnvironmentProperty[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EnvironmentProperty TERMINAL_HEIGHT
public static final EnvironmentProperty TERMINAL_WIDTH
public static final EnvironmentProperty CONSOLE_WIDTH
public static final EnvironmentProperty CONSOLE_HEIGHT
public static final EnvironmentProperty CONSOLE_LINE_BREAK
public static final EnvironmentProperty CONSOLE_ANSI
public static final EnvironmentProperty LOGGER_LAYOUT
public static final EnvironmentProperty LOGGER_STYLE
public static final EnvironmentProperty COMPUTERNAME
public static final EnvironmentProperty USER_HOME
public static final EnvironmentProperty TERM
public static final EnvironmentProperty HTTP_PROXY
public static final EnvironmentProperty HTTPS_PROXY
public static final EnvironmentProperty NO_PROXY
public static EnvironmentProperty[] values()
for (EnvironmentProperty c : EnvironmentProperty.values()) System.out.println(c);
public static EnvironmentProperty valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getKey()
getKey
in interface org.refcodes.mixin.KeyAccessor<String>
public String getValue()
getValue
in interface org.refcodes.mixin.ValueAccessor<String>
public void setValue(String aValue)
setValue
in interface org.refcodes.mixin.ValueAccessor.ValueMutator<String>
aValue
- the new valueCopyright © 2017. All rights reserved.