Class ConfigurationValidationService
- java.lang.Object
-
- org.glassfish.hk2.configuration.internal.ConfigurationValidationService
-
- All Implemented Interfaces:
ValidationService
@Singleton @Visibility(LOCAL) public class ConfigurationValidationService extends java.lang.Object implements ValidationService
-
-
Field Summary
Fields Modifier and Type Field Description private static FilterLOOKUP_FILTERprivate ConfiguredValidatorvalidator
-
Constructor Summary
Constructors Constructor Description ConfigurationValidationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FiltergetLookupFilter()This filter will be run at least once per descriptor at the point that the descriptor is being looked up, either with theServiceLocatorAPI or due to an @Inject resolution.ValidatorgetValidator()Returns theValidatorthat will be run whenever aDescriptorthat passed the filter is to be looked up with the API or injected into an injection point, or on any bind or unbind operation.
-
-
-
Field Detail
-
LOOKUP_FILTER
private static final Filter LOOKUP_FILTER
-
validator
@Inject private ConfiguredValidator validator
-
-
Method Detail
-
getLookupFilter
public Filter getLookupFilter()
Description copied from interface:ValidationServiceThis filter will be run at least once per descriptor at the point that the descriptor is being looked up, either with theServiceLocatorAPI or due to an @Inject resolution. The decision made by this filter will be cached and used every time that Descriptor is subsequently looked up. No validation checks should be done in the returned filter, it is purely meant to limit theDescriptors that are passed into the validator.Descriptors passed to this filter may or may not be reified. The filter should try as much as possible to do its work without reifying the descriptor.
The filter may be run more than once on a descriptor if some condition caused the cache of results per descriptor to become invalidated.
- Specified by:
getLookupFilterin interfaceValidationService- Returns:
- The filter to be used to determine if the validators associated with this
service should be called when the passed in
Descriptoris looked up
-
getValidator
public Validator getValidator()
Description copied from interface:ValidationServiceReturns theValidatorthat will be run whenever aDescriptorthat passed the filter is to be looked up with the API or injected into an injection point, or on any bind or unbind operation. If this method returns false then the operation will not proceed.- Specified by:
getValidatorin interfaceValidationService- Returns:
- A non-null validator
-
-