public class PortRestriction extends AbstractCommonRestriction implements HelpHint
| Constructor and Description |
|---|
PortRestriction(PortRange... portRanges) |
| Modifier and Type | Method and Description |
|---|---|
String[] |
getContentBlock(int blockNumber)
Gets the content block with the given number
|
HelpFormat |
getFormat()
Gets the format of the provided help information
|
String |
getPreamble()
Gets the preamble text that should be included
|
protected boolean |
inAnyAcceptableRange(int port) |
protected void |
invalidArgumentsPort(ArgumentsMetadata arguments,
String title,
Object value) |
protected void |
invalidOptionPort(OptionMetadata option,
String title,
Object value) |
protected void |
invalidPort(String title,
Object value) |
int |
numContentBlocks()
Gets the number of content blocks provided
|
<T> void |
postValidate(ParseState<T> state,
ArgumentsMetadata arguments,
Object value)
Method that is called after Airline has converted a string argument
received into a strongly typed Java value
|
<T> void |
postValidate(ParseState<T> state,
OptionMetadata option,
Object value)
Method that is called after Airline has converted a string argument
received into a strongly typed Java value
|
finalValidate, finalValidate, getArgumentTitle, getArgumentTitle, getOptionTitle, preValidate, preValidatepublic PortRestriction(PortRange... portRanges)
public <T> void postValidate(ParseState<T> state, OptionMetadata option, Object value)
OptionRestrictionpostValidate in interface OptionRestrictionpostValidate in class AbstractCommonRestrictionstate - Parser stateoption - Option meta-datavalue - Strongly typed valueprotected void invalidOptionPort(OptionMetadata option, String title, Object value)
protected void invalidArgumentsPort(ArgumentsMetadata arguments, String title, Object value)
public <T> void postValidate(ParseState<T> state, ArgumentsMetadata arguments, Object value)
ArgumentsRestrictionpostValidate in interface ArgumentsRestrictionpostValidate in class AbstractCommonRestrictionstate - Parser statearguments - Arguments meta-datavalue - Strongly typed valueprotected boolean inAnyAcceptableRange(int port)
public String getPreamble()
HelpHintgetPreamble in interface HelpHintpublic HelpFormat getFormat()
HelpHintpublic int numContentBlocks()
HelpHint
Help generators should consult the HelpHint.getFormat() return value to
determine how to format the content blocks but they are not required to
do so
numContentBlocks in interface HelpHintpublic String[] getContentBlock(int blockNumber)
HelpHintgetContentBlock in interface HelpHintblockNumber - Block numberCopyright © 2012–2022. All rights reserved.