Module com.github.rvesse.airline
Class RequiredOnlyIfRestrictionFactory
- java.lang.Object
-
- com.github.rvesse.airline.restrictions.factories.RequiredOnlyIfRestrictionFactory
-
- All Implemented Interfaces:
OptionRestrictionFactory
public class RequiredOnlyIfRestrictionFactory extends java.lang.Object implements OptionRestrictionFactory
-
-
Constructor Summary
Constructors Constructor Description RequiredOnlyIfRestrictionFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OptionRestriction
createOptionRestriction(java.lang.annotation.Annotation annotation)
Try and create an option restriction from the given annotationjava.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>>
supportedOptionAnnotations()
Gets a list of annotations that this factory can convert into option restrictions
-
-
-
Method Detail
-
createOptionRestriction
public OptionRestriction createOptionRestriction(java.lang.annotation.Annotation annotation)
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
-
supportedOptionAnnotations
public java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>> 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
-
-