public final class JVMArguments extends Object
Constructor and Description |
---|
JVMArguments(Collection<? extends String> c) |
JVMArguments(int size) |
Modifier and Type | Method and Description |
---|---|
void |
add(String arg) |
void |
createOrUpdateSystemProperty(String pname,
Function<String,String> replacer) |
static JVMArguments |
current()
Gets the process argument list of the current process.
|
boolean |
equals(Object obj) |
String |
getExecutable() |
String |
getSystemProperty(String pname) |
int |
hashCode() |
boolean |
hasSystemProperty(String pname) |
boolean |
hasVMArgument(String argument) |
boolean |
hasVMArgumentStartingWith(String argumentPrefix) |
static JVMArguments |
of(int pid)
Gets the process argument list of the specified process ID.
|
int |
removeAllSystemPropertiesStartingWith(String pname)
remove all system properties starting with a prefix.
|
String |
removeSystemProperty(String pname)
Removes the first System property.
|
void |
removeTail(int n)
Removes the n items from the end.
|
boolean |
removeVMArgument(String argument) |
void |
setSystemProperty(String name,
String value) |
void |
setVMArgument(String argument) |
String[] |
toArray() |
String |
toString() |
com.sun.jna.StringArray |
toStringArray() |
public JVMArguments(int size)
public JVMArguments(Collection<? extends String> c)
public String getExecutable()
@Nullable public String removeSystemProperty(String pname)
pname
- the name of the system property to remove.@Nullable public void createOrUpdateSystemProperty(String pname, Function<String,String> replacer)
public boolean hasSystemProperty(String pname)
public int removeAllSystemPropertiesStartingWith(String pname)
pname
- the prefixpublic void setVMArgument(String argument)
public boolean removeVMArgument(String argument)
public boolean hasVMArgument(String argument)
public boolean hasVMArgumentStartingWith(String argumentPrefix)
public void add(String arg)
public void removeTail(int n)
public com.sun.jna.StringArray toStringArray()
public static JVMArguments current() throws IOException
IOException
public static JVMArguments of(int pid) throws IOException
pid
- -1 to indicate the current process.IOException
public String[] toArray()
Copyright © 2018 SPF4J. All rights reserved.