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.

  1. template canFactoryPropertyConfigurer(alias T, Z, string property = "")
    template canFactoryPropertyConfigurer (
    Z
    string property = ""
    ) {}
  2. template canFactoryPropertyConfigurer(T, Z, string property = "")

Members

Aliases

canFactoryPropertyConfigurer
alias canFactoryPropertyConfigurer = canFactoryPropertyConfigurer!(typeof(T), Z, property)
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