Reusable Java library of general tools with minimal external dependencies.
For questions or support, please contact us:
Email: support@aoindustries.com
Phone: 1-800-519-9541
Phone: +1-251-607-9556
Web: https://www.aoindustries.com/contact
public class GetOpt extends Object
boolean options default to true if no
value provided. Also supports a single "--" that is used to separate
parameters from non-parameters. All arguments start with -- before the "--"
must be valid parameters.| Modifier and Type | Method and Description |
|---|---|
static List<String> |
getArguments(String[] args)
Gets all of the non-parameter arguments.
|
static <T> T |
getOpt(String[] args,
String name,
Class<T> type)
Gets an argument of the provided type.
|
static <T> T |
parse(String value,
Class<T> type)
Parses a String value to the provided type.
|
public static <T> T parse(String value, Class<T> type)
public static valueOf(String) methodString parameterpublic static <T> T getOpt(String[] args, String name, Class<T> type)
true.
"--" may be used to separate parameters from arguments.null if not foundparse(String,Class)public static List<String> getArguments(String[] args)
Copyright © 2000–2016 AO Industries, Inc.. All rights reserved.