Skip to content
Daan van Yperen edited this page Sep 29, 2015 · 1 revision

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'.

UseInjectionCache

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.

Clone this wiki locally