public class ParameterMapExtractor extends Object
This can be useful from a supplemental command which needs to create a new command invocation, with parameters similar to its own, for execution on a cluster.
| Constructor and Description |
|---|
ParameterMapExtractor(Object... targets)
Creates a new extractor based on the injected values in one or more
injected targets, typically AdminCommand or CommandParameters
implementations.
|
| Modifier and Type | Method and Description |
|---|---|
org.glassfish.api.admin.ParameterMap |
extract()
Creates a ParameterMap from the @Param fields defined on the
injected objects provided in the constructor call.
|
org.glassfish.api.admin.ParameterMap |
extract(Collection<String> parameterNamesToExclude)
Creates a ParameterMap from the @Param fields defined on the
injected objects provided in the constructor call, excluding selected parameters.
|
static String |
propertiesToPropertiesString(Properties props,
char sep) |
String |
propertiesValue(Properties props,
char sep) |
public ParameterMapExtractor(Object... targets)
Note that the objects are processed in the order specified, and any values set in later objects will override values that were set from earlier objects.
targets - the objects to inspect for injected @Param valuesIllegalArgumentException - if a null is passed for the targetspublic org.glassfish.api.admin.ParameterMap extract()
throws IllegalArgumentException,
IllegalAccessException
IllegalArgumentExceptionIllegalAccessExceptionpublic org.glassfish.api.admin.ParameterMap extract(Collection<String> parameterNamesToExclude) throws IllegalArgumentException, IllegalAccessException
parameterNamesToExclude - parameter names to exclude from the parameter mapIllegalArgumentExceptionIllegalAccessExceptionpublic static String propertiesToPropertiesString(Properties props, char sep)
public String propertiesValue(Properties props, char sep)
Copyright © 2017–2020 Eclipse Foundation. All rights reserved.