-
Notifications
You must be signed in to change notification settings - Fork 110
FieldHandler
Daan van Yperen edited this page Sep 29, 2015
·
1 revision
The FieldHandler is responsible for providing value for fields eligible for dependency injection. When the Injector
encounters a field, it calls FieldHandler.resolve(Class<?>, Field)
, and if it returns a non-null value, it will be assigned to the field.
The FieldHandler maintains a list of FieldResolver
s, and calls FieldResolver.resolve(Class<?>, Field)
until a resolver returns a non-null value.
FieldHandler can be fully sub-classed if the default implementation provides too limiting.
-
FieldHandler(InjectionCache)
: Creates a FieldHandler with ArtemisFieldResolver -
FieldHandler(InjectionCache, Map<String, Object>)
: Creates an FieldHandler with ArtemisFieldResolver and WiredFieldResolver, the latter instansiated with the provided injectables. -
FieldHandler(InjectionCache, Bag<FieldResolver>)
: Creates a FieldHander with the provided resolvers. Note: For world-injection to work correctly, the bag should contain ArtemisFieldResolver, or ArtemisFieldResolver should be added via 'FieldHandler.addResolver' prior to callingnew World()
.
- Overview
- Concepts
- Getting Started
- Using
- More guides
- Plugins
- Game Gallery
- Tools and Frameworks
- API reference