Package org.opends.quicksetup
Class JavaArguments
- java.lang.Object
-
- org.opends.quicksetup.JavaArguments
-
public class JavaArguments extends Object
A class used to describe the java arguments for a given command-line.
-
-
Constructor Summary
Constructors Constructor Description JavaArguments()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)String[]getAdditionalArguments()Returns the additional arguments to be used when executing the command-line.intgetInitialMemory()Returns the initial memory allowed to execute the command-line.static StringgetInitialMemoryArgument(int value)Returns the java argument to specify the initial memory to be used.static StringgetInitialMemoryGenericArgument()Returns a generic initial memory argument (to be used in messages).intgetMaxMemory()Returns the maximum memory allowed to execute the command-line.static StringgetMaxMemoryArgument(int value)Returns the java argument to specify the maximum memory that can be used.static StringgetMaxMemoryGenericArgument()Returns a generic maximum memory argument (to be used in messages).static org.forgerock.i18n.LocalizableMessagegetMessageForJLabel(JavaArguments javaArguments, JavaArguments defaultJavaArguments, Font font)Returns the message in HTML format to be used in a JLabel representing a java arguments object.StringgetStringArguments()Returns a String representation of the arguments (the String that must be passed when invoking java).inthashCode()voidsetAdditionalArguments(String[] additionalArguments)Sets the additional arguments to be used when executing the command-line.voidsetInitialMemory(int initialMemory)Sets the initial memory allowed to execute the command-line.voidsetMaxMemory(int maxMemory)Sets the maximum memory allowed to execute the command-line.StringtoString()
-
-
-
Method Detail
-
getMaxMemory
public int getMaxMemory()
Returns the maximum memory allowed to execute the command-line.- Returns:
- the maximum memory allowed to execute the command-line.
-
setMaxMemory
public void setMaxMemory(int maxMemory)
Sets the maximum memory allowed to execute the command-line.- Parameters:
maxMemory- the maximum memory allowed to execute the command-line.
-
getInitialMemory
public int getInitialMemory()
Returns the initial memory allowed to execute the command-line.- Returns:
- the initial memory allowed to execute the command-line.
-
setInitialMemory
public void setInitialMemory(int initialMemory)
Sets the initial memory allowed to execute the command-line.- Parameters:
initialMemory- the initial memory allowed to execute the command-line.
-
getAdditionalArguments
public String[] getAdditionalArguments()
Returns the additional arguments to be used when executing the command-line.- Returns:
- the additional arguments to be used when executing the command-line.
-
setAdditionalArguments
public void setAdditionalArguments(String[] additionalArguments)
Sets the additional arguments to be used when executing the command-line.- Parameters:
additionalArguments- the additional arguments to be used when executing the command-line. It cannot be null.
-
getMessageForJLabel
public static org.forgerock.i18n.LocalizableMessage getMessageForJLabel(JavaArguments javaArguments, JavaArguments defaultJavaArguments, Font font)
Returns the message in HTML format to be used in a JLabel representing a java arguments object.- Parameters:
javaArguments- the java arguments to be represented.defaultJavaArguments- the default values for the java arguments.font- the font to be used.- Returns:
- the message representing a java arguments object.
-
getStringArguments
public String getStringArguments()
Returns a String representation of the arguments (the String that must be passed when invoking java).- Returns:
- a String representation of the arguments (the String that must be passed when invoking java).
-
getInitialMemoryArgument
public static String getInitialMemoryArgument(int value)
Returns the java argument to specify the initial memory to be used.- Parameters:
value- the value in megabytes to be specified.- Returns:
- the java argument to specify the initial memory to be used.
-
getInitialMemoryGenericArgument
public static String getInitialMemoryGenericArgument()
Returns a generic initial memory argument (to be used in messages).- Returns:
- a generic initial memory argument (to be used in messages).
-
getMaxMemoryArgument
public static String getMaxMemoryArgument(int value)
Returns the java argument to specify the maximum memory that can be used.- Parameters:
value- the value in megabytes to be specified.- Returns:
- the java argument to specify the maximum memory that can be used.
-
getMaxMemoryGenericArgument
public static String getMaxMemoryGenericArgument()
Returns a generic maximum memory argument (to be used in messages).- Returns:
- a generic maximum memory argument (to be used in messages).
-
-