Module com.github.rvesse.airline
Class SimpleRestrictionsFactory
java.lang.Object
com.github.rvesse.airline.restrictions.factories.SimpleRestrictionsFactory
- All Implemented Interfaces:
ArgumentsRestrictionFactory
,OptionRestrictionFactory
public class SimpleRestrictionsFactory
extends Object
implements OptionRestrictionFactory, ArgumentsRestrictionFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateArgumentsRestriction
(Annotation annotation) Tries to create an arguments restriction from the given annotationprivate AbstractCommonRestriction
createCommon
(Annotation annotation) createOptionRestriction
(Annotation annotation) Try and create an option restriction from the given annotationprotected 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
-
SimpleRestrictionsFactory
public SimpleRestrictionsFactory()
-
-
Method Details
-
createArgumentsRestriction
Description copied from interface:ArgumentsRestrictionFactory
Tries to create an arguments restriction from the given annotation- Specified by:
createArgumentsRestriction
in interfaceArgumentsRestrictionFactory
- Parameters:
annotation
- Annotation- Returns:
- Arguments restriction or
null
if this factory cannot create a restriction from the given annotation
-
createCommon
-
createOptionRestriction
Description copied from interface:OptionRestrictionFactory
Try and create an option restriction from the given annotation- Specified by:
createOptionRestriction
in interfaceOptionRestrictionFactory
- Parameters:
annotation
- Annotation- Returns:
- Option restriction or
null
if this factory cannot create a restriction from the given annotation
-
supportedAnnotations
-
supportedArgumentsAnnotations
Description copied from interface:ArgumentsRestrictionFactory
Gets a list of annotations that this factory can convert into arguments restrictions- Specified by:
supportedArgumentsAnnotations
in interfaceArgumentsRestrictionFactory
- Returns:
- List of supported annotations
-
supportedOptionAnnotations
Description copied from interface:OptionRestrictionFactory
Gets a list of annotations that this factory can convert into option restrictions- Specified by:
supportedOptionAnnotations
in interfaceOptionRestrictionFactory
- Returns:
- List of supported annotations
-