public class RangeRestrictionFactory extends Object implements OptionRestrictionFactory, ArgumentsRestrictionFactory
| Constructor and Description |
|---|
RangeRestrictionFactory() |
| Modifier and Type | Method and Description |
|---|---|
ArgumentsRestriction |
createArgumentsRestriction(Annotation annotation)
Tries to create an arguments restriction from the given annotation
|
protected RangeRestriction |
createByteRange(Annotation annotation) |
protected AbstractCommonRestriction |
createCommon(Annotation annotation)
Handles converting all the basic range annotations into appropriate range
restrictions
|
protected RangeRestriction |
createDoubleRange(Annotation annotation) |
protected RangeRestriction |
createFloatRange(Annotation annotation) |
protected RangeRestriction |
createIntegerRange(Annotation annotation) |
protected AbstractCommonRestriction |
createLengthRange(Annotation annotation) |
protected RangeRestriction |
createLexicalRange(Annotation annotation) |
protected RangeRestriction |
createLongRange(Annotation annotation) |
OptionRestriction |
createOptionRestriction(Annotation annotation)
Try and create an option restriction from the given annotation
|
protected RangeRestriction |
createShortRange(Annotation annotation) |
protected AbstractCommonRestriction |
createUnknownRange(Annotation annotation)
Handles turning unknown annotations into range restrictions, derived
factories can extend this to add support for additional range
restrictions
|
protected List<Class<? extends Annotation>> |
supportedAnnotations() |
List<Class<? extends Annotation>> |
supportedArgumentsAnnotations()
Gets a list of annotations that this factory can convert into arguments
restrictions
|
List<Class<? extends Annotation>> |
supportedOptionAnnotations()
Gets a list of annotations that this factory can convert into option
restrictions
|
public final OptionRestriction createOptionRestriction(Annotation annotation)
OptionRestrictionFactorycreateOptionRestriction in interface OptionRestrictionFactoryannotation - Annotationnull if this factory cannot create
a restriction from the given annotationpublic final ArgumentsRestriction createArgumentsRestriction(Annotation annotation)
ArgumentsRestrictionFactorycreateArgumentsRestriction in interface ArgumentsRestrictionFactoryannotation - Annotationnull if this factory cannot
create a restriction from the given annotationprotected final AbstractCommonRestriction createCommon(Annotation annotation)
annotation - Annotation to create range fromprotected AbstractCommonRestriction createUnknownRange(Annotation annotation)
annotation - Annotation to create range fromprotected AbstractCommonRestriction createLengthRange(Annotation annotation)
protected RangeRestriction createLexicalRange(Annotation annotation)
protected RangeRestriction createFloatRange(Annotation annotation)
protected RangeRestriction createDoubleRange(Annotation annotation)
protected RangeRestriction createByteRange(Annotation annotation)
protected RangeRestriction createShortRange(Annotation annotation)
protected RangeRestriction createIntegerRange(Annotation annotation)
protected RangeRestriction createLongRange(Annotation annotation)
protected List<Class<? extends Annotation>> supportedAnnotations()
public List<Class<? extends Annotation>> supportedArgumentsAnnotations()
ArgumentsRestrictionFactorysupportedArgumentsAnnotations in interface ArgumentsRestrictionFactorypublic List<Class<? extends Annotation>> supportedOptionAnnotations()
OptionRestrictionFactorysupportedOptionAnnotations in interface OptionRestrictionFactoryCopyright © 2012–2022. All rights reserved.