Class PortRestrictionFactory
java.lang.Object
com.github.rvesse.airline.restrictions.factories.PortRestrictionFactory
- All Implemented Interfaces:
ArgumentsRestrictionFactory, OptionRestrictionFactory
public class PortRestrictionFactory
extends Object
implements OptionRestrictionFactory, ArgumentsRestrictionFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateArgumentsRestriction(Annotation annotation) Tries to create an arguments restriction from the given annotationprotected final PortRestrictioncreateCommon(Port annotation) protected final PortRestrictioncreateCommon(PortRange... ranges) createOptionRestriction(Annotation annotation) Try and create an option restriction from the given annotationprotected final PortRangecreateRange(PortRange rangeAnnotation) protected List<Class<? extends Annotation>> List<Class<? extends Annotation>> Gets a list of annotations that this factory can convert into arguments restrictionsList<Class<? extends Annotation>> Gets a list of annotations that this factory can convert into option restrictions
-
Constructor Details
-
PortRestrictionFactory
public PortRestrictionFactory()
-
-
Method Details
-
createArgumentsRestriction
Description copied from interface:ArgumentsRestrictionFactoryTries to create an arguments restriction from the given annotation- Specified by:
createArgumentsRestrictionin interfaceArgumentsRestrictionFactory- Parameters:
annotation- Annotation- Returns:
- Arguments restriction or
nullif this factory cannot create a restriction from the given annotation
-
createOptionRestriction
Description copied from interface:OptionRestrictionFactoryTry and create an option restriction from the given annotation- Specified by:
createOptionRestrictionin interfaceOptionRestrictionFactory- Parameters:
annotation- Annotation- Returns:
- Option restriction or
nullif this factory cannot create a restriction from the given annotation
-
createRange
-
createCommon
-
createCommon
-
supportedAnnotations
-
supportedArgumentsAnnotations
Description copied from interface:ArgumentsRestrictionFactoryGets a list of annotations that this factory can convert into arguments restrictions- Specified by:
supportedArgumentsAnnotationsin interfaceArgumentsRestrictionFactory- Returns:
- List of supported annotations
-
supportedOptionAnnotations
Description copied from interface:OptionRestrictionFactoryGets a list of annotations that this factory can convert into option restrictions- Specified by:
supportedOptionAnnotationsin interfaceOptionRestrictionFactory- Returns:
- List of supported annotations
-