public abstract class TargetOption extends BasicOption
BasicOption to add an association between the option
and a specifc set of file formats.
The following code can be used to construct a complete description for a
specific TargetOption.
public String getCompleteDescription(TargetOption option) {
StringBuffer buf = new StringBuffer();
buf.append(option.getName())
buf.append("\n\n");
buf.append(option.getLongDescription());
TargetOption.FormatInformation[] formats = option.appliesTo();
for (int i = 0; i < formats.length; i++) {
if (formats[i].getDescription() != "") {
buf.append("\n\n");
buf.append(formats[i].getDescription());
}
}
buf.append("\n\nApplies to:\n");
for (int i = 0; i < formats.length; i++) {
buf.append(formats[i].getFormat().getName());
buf.append("\n");
}
return buf.toString();
}
| Modifier and Type | Class and Description |
|---|---|
static class |
TargetOption.FormatInformation
Combination of a file format and a description that is associated with a
specific
TargetOption. |
| Modifier and Type | Method and Description |
|---|---|
TargetOption.FormatInformation[] |
appliesTo()
Returns the list of file formats this option applies to.
|
TargetOption |
getParent()
Returns the parent Target of this Target.
|
getId, getLongDescription, getName, getShortDescription, getUid, isRequest, isResponse, toStringpublic TargetOption.FormatInformation[] appliesTo()
FormatInformation objects also include a description of how
the option applies to that specific format.public TargetOption getParent()
Copyright © 2021 Oracle. All right reserved. Restricted and confidential property of Oracle. Solely for use by recipent under agreement forbidding disclosure.