|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jniwrapper.Parameter com.jniwrapper.Pointer.Void com.jniwrapper.win32.Handle com.jniwrapper.win32.process.ProcessVariables
public class ProcessVariables
This class allows managing environment variables for a process.
Nested Class Summary | |
---|---|
protected static class |
ProcessVariables.EnvironmentVariablesResource
This class is responsible for destroying a native resource when the instance is collected by garbage-collector. |
Field Summary |
---|
Fields inherited from class com.jniwrapper.win32.Handle |
---|
INFINITE_TIMEOUT, INVALID_HANDLE_VALUE, STATUS_ABANDONED_WAIT_0, STATUS_TIMEOUT, STATUS_WAIT_0 |
Fields inherited from class com.jniwrapper.Parameter |
---|
LICENSE_TYPE, V |
Constructor Summary | |
---|---|
ProcessVariables()
Create an instance of the ProcessVariables class,
which contains all environment variables of the current process. |
|
ProcessVariables(java.lang.String[] variables)
Allocates new Environment variables. |
Method Summary | |
---|---|
boolean |
contains(java.lang.String variable)
Verifies if there is a specified variable in the environment. |
void |
freeEnvironmentStrings()
Frees a block of environment strings. |
java.lang.String[] |
getStrings()
Returns the strings containing environment variables in key=value format for the calling process. |
java.lang.String |
getValue(java.lang.String variable)
Returns the value of the specified variable from the environment block of the calling process. |
java.lang.String[] |
getVariableNames()
Returns an array of variable names. |
protected void |
registerResource()
|
void |
removeVariable(java.lang.String variable)
Removes specified environment variable for the current process. |
void |
setValue(java.lang.String variable,
java.lang.String value)
Sets the value of an environment variable for the current process. |
java.util.Map |
toMap()
Returns a map of the environment variables for the current process. |
Methods inherited from class com.jniwrapper.win32.Handle |
---|
clone, closeHandle, equals, waitFor, waitFor |
Methods inherited from class com.jniwrapper.Pointer.Void |
---|
asFunction, asFunction, asTypedPointer, castTo, castTo, getDebugInfo, getLength, getValue, hashCode, isNull, read, setValue, toString, write |
Methods inherited from class com.jniwrapper.Parameter |
---|
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ProcessVariables()
ProcessVariables
class,
which contains all environment variables of the current process.
public ProcessVariables(java.lang.String[] variables)
variables
- Method Detail |
---|
protected void registerResource()
public java.lang.String[] getStrings()
public java.util.Map toMap()
public java.lang.String getValue(java.lang.String variable)
getValue
in interface EnvironmentVariables
variable
- name of the variable to get the value for.
public void setValue(java.lang.String variable, java.lang.String value)
setValue
in interface EnvironmentVariables
variable
- variable name.value
- variable value.public void removeVariable(java.lang.String variable)
removeVariable
in interface EnvironmentVariables
variable
- variable name.public boolean contains(java.lang.String variable)
contains
in interface EnvironmentVariables
variable
- variable name.
public java.lang.String[] getVariableNames()
getVariableNames
in interface EnvironmentVariables
public void freeEnvironmentStrings()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |