/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2010 Sun Microsystems, Inc.
* Portions Copyright 2013-2015 ForgeRock AS.
*/
/**
* A class used to describe the java arguments for a given command-line.
*/
public class JavaArguments
{
/**
* Returns the maximum memory allowed to execute the command-line.
* @return the maximum memory allowed to execute the command-line.
*/
public int getMaxMemory()
{
return maxMemory;
}
/**
* Sets the maximum memory allowed to execute the command-line.
* @param maxMemory the maximum memory allowed to execute the command-line.
*/
{
}
/**
* Returns the initial memory allowed to execute the command-line.
* @return the initial memory allowed to execute the command-line.
*/
public int getInitialMemory()
{
return initialMemory;
}
/**
* Sets the initial memory allowed to execute the command-line.
* @param initialMemory the initial memory allowed to execute the
* command-line.
*/
{
this.initialMemory = initialMemory;
}
/**
* Returns the additional arguments to be used when executing the
* command-line.
* @return the additional arguments to be used when executing the
* command-line.
*/
{
return additionalArguments;
}
/**
* Sets the additional arguments to be used when executing the
* command-line.
* @param additionalArguments the additional arguments to be used when
* executing the command-line. It cannot be null.
*/
{
if (additionalArguments == null)
{
throw new IllegalArgumentException("additionalArguments cannot be null.");
}
}
/** {@inheritDoc} */
{
if (o == this)
{
return true;
}
if (o instanceof JavaArguments)
{
}
return false;
}
/** {@inheritDoc} */
public int hashCode()
{
{
}
return hashCode;
}
/** {@inheritDoc} */
{
int i=1;
{
i++;
}
}
/**
* Returns the message in HTML format to be used in a JLabel representing a
* java arguments object.
* @param javaArguments the java arguments to be represented.
* @param defaultJavaArguments the default values for the java arguments.
* @param font the font to be used.
* @return the message representing a java arguments object.
*/
{
if (s.contains("<br>"))
{
}
return msg;
}
/**
* Returns the message in HTML format to be used in a representing a
* java arguments object. Note that no formatting of font is done.
* @param javaArguments the java arguments to be represented.
* @param defaultJavaArguments the default values for the java arguments.
* @return the message representing a java arguments object.
*/
{
{
}
else
{
{
}
{
}
{
{
{
}
}
}
{
}
{
}
else
{
}
}
return msg;
}
/**
* Returns a String representation of the arguments (the String that must
* be passed when invoking java).
* @return a String representation of the arguments (the String that must
* be passed when invoking java).
*/
{
if (initialMemory != -1)
{
}
if (maxMemory != -1)
{
}
{
}
return joinAsString(" ", l);
}
/**
* Returns the java argument to specify the initial memory to be used.
* @param value the value in megabytes to be specified.
* @return the java argument to specify the initial memory to be used.
*/
{
}
/**
* Returns a generic initial memory argument (to be used in messages).
* @return a generic initial memory argument (to be used in messages).
*/
{
}
/**
* Returns the java argument to specify the maximum memory that can be used.
* @param value the value in megabytes to be specified.
* @return the java argument to specify the maximum memory that can be used.
*/
{
}
/**
* Returns a generic maximum memory argument (to be used in messages).
* @return a generic maximum memory argument (to be used in messages).
*/
{
}
}