-
Notifications
You must be signed in to change notification settings - Fork 113
Annotation processor options
Toothpick annotations processors uses the following annotation processor options.
This option indicates to Toothpick in which package both Factory & Member Injectors Registries should be generated when compiling a given compilation unit.
It can be useful, when using registries instead of reflection (see Configurations for more details).
Example : -Atoothpick_registry_package_name="com.foo"
This option indicates to Toothpick in which package(s) are located the children registries of a given compilation unit. When creating a Factory & Member Injectors Registries for a given compilation unit, both of them can use children registries. This option indicates where to find them.
It can be useful, when using registries instead of reflection (see Configurations for more details).
Children registries packages are expressed as a comma separated list of package names.
Example : -Atoothpick_registry_children_package_names="com.bar,com.baz"
This option can be used to exclude classes for which a MemberInjector or a Factory should be created. It can be useful, when using registries instead of reflection (see Configurations for more details).
Excludes are defined using java regular expressions, comma separated.
Example : -Atoothpick_excludes="java.*,android.*"
(default value)
This option can be used to let Toothpick know about custom scope annotation classes.
So, factories can be created for the classes annotated with these custom annotations without the need of containing any @Inject annotated member or constructor. The same way it happens for @Singleton and @ProvidesSingletonInScope.
If you use custom scope annotations, it is a good practice to always use this option so that developers can use the new scope annotation in a very free way without having to consider the annotation processing internals.
Custom scope annotations are expressed as a comma separated list.
Example : -Atoothpick_annotations="com.bar.ActivitySingleton,com.bar.PresenterSingleton"