-
Notifications
You must be signed in to change notification settings - Fork 114
FieldResolver
FieldResolver
provides values for injection via the method Object FieldResolver.resolve(Class<?>, Field)
. Implementations of FieldResolver have to ensure that the returned value is of correct type for the field.
Returning null from the resolve method indicates to the 'FieldHandler' that the 'FieldResolver' was unable to provide a value, and that subsequent 'FieldResolver' should be used.
Returning any non-null value will terminate the resolution chain in the 'FieldHandler.resolve' method, and the FieldHandler will return the provided value to the callee of 'FieldHandler.resolve'.
If the FieldResolver implements UseInjectionCache
, the UseInjectionCache.setCache(InjectionCache) method will be called on FieldResolver when the parent FieldHandler is initialized, prior to FieldResolver.initialized being called. This is useful if the FieldResolver needs access to the InjectionCache.
###ArtemisFieldResolver Provides values for the following types from the World.
###WiredFieldResolver Provides values for fields annotated with @Wire.
- Overview
- Concepts
- Getting Started
- Using
- More guides
- Plugins
- Game Gallery
- Tools and Frameworks
- API reference