Package org.int4.dirk.library
Class ProducesTypeRegistrationExtension
- java.lang.Object
-
- org.int4.dirk.library.ProducesTypeRegistrationExtension
-
- All Implemented Interfaces:
TypeRegistrationExtension
public class ProducesTypeRegistrationExtension extends java.lang.Object implements TypeRegistrationExtension
Extension which looks for members annotated with a produces annotation, and if found registers these with the injector.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.int4.dirk.spi.discovery.TypeRegistrationExtension
TypeRegistrationExtension.Registry
-
-
Constructor Summary
Constructors Constructor Description ProducesTypeRegistrationExtension(java.lang.Class<? extends java.lang.annotation.Annotation> produces)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidderiveTypes(TypeRegistrationExtension.Registry registry, java.lang.reflect.Type type)Called during registration of new types to allow the extension to register further types that can be directly derived from the givenType.
-
-
-
Method Detail
-
deriveTypes
public void deriveTypes(TypeRegistrationExtension.Registry registry, java.lang.reflect.Type type) throws DefinitionException
Description copied from interface:TypeRegistrationExtensionCalled during registration of new types to allow the extension to register further types that can be directly derived from the givenType. For example, the given type could have special annotations which define further types.- Specified by:
deriveTypesin interfaceTypeRegistrationExtension- Parameters:
registry- aTypeRegistrationExtension.Registrywhere derived types can be registered, nevernulltype- aTypeused as a base for derivation, nevernull- Throws:
DefinitionException- when a definition problem was encountered during derivation
-
-