@Contract public interface ValidationService
An implementation of ValidationService must be in the Singleton scope.
Implementations of ValidationService will be instantiated as soon as
they are added to HK2 in order to avoid deadlocks and circular references.
Therefore it is recommended that implementations of ValidationService
make liberal use of
when injecting dependent services so that these services are not instantiated
when the ValidationService is created
|Modifier and Type||Method and Description|
This filter will be run at least once per descriptor at the point that the descriptor is being looked up, either with the
ServiceLocatorAPI 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 the
Descriptors 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.
Descriptoris looked up
Validatorthat will be run whenever a
Descriptorthat 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.
Copyright © 2009-2017, Oracle and/or its affiliates. All Rights Reserved.