canFactoryPropertyConfigurer

Checks if a structure has factoryConfigurer method for PropertyConfigurer.

This static interface is used to find annotations that can provide a PropertyConfigurer for GenericFactory to be used by it to configure the object. The @setter annotation implements this annotation and therefore it is possible to use it to mark a setter to be used for object construction. Any annotation implementing this interface can be used by annotation system to configure objects.

Members

Aliases

checker
alias checker = templateOr!(chain!(partialPrefixed!(isDerived, ReturnType!(factory!(Z, property))), chain!(PropertyConfigurer, Wrapper)), chain!(partialPrefixed!(isDerived, ReturnType!(factory!(Z, property))), PropertyConfigurer))
Undocumented in source.
factory
alias factory = getMember!(T, "factoryConfigurer")
Undocumented in source.

Variables

canFactoryPropertyConfigurer
enum bool canFactoryPropertyConfigurer;
Undocumented in source.
canFactoryPropertyConfigurer
enum bool canFactoryPropertyConfigurer;
Undocumented in source.

Parameters

T

the structure to be tested for interface compatibility

Z

the type of object that T has to call T's property method

property

the method of Z that T has to call

Return Value

true in case of structure implementing static interface, false otherwise.

Examples

struct Setter(Args...) {
    Tuple!Args args;

    this(Args args) {
        this.args = args;
    }

    PropertyConfigurer!T factoryConfigurer(T, string method)(Locator!() locator) {
        auto method = new MethodConfigurer!(T, method, Args)(args.expand);
        method.locator = locator;

        return method;
    }
}

Meta