class ConfigurableServiceUtil {

    public static ConfigurableService asConfigurableService(Function<String, @Nullable Object> propertyResolver) {
        return new ConfigurableService() {
            @Override
            public Class<? extends Annotation> annotationType() {
                return ConfigurableService.class;
            }

            @Override
            public String label() {
                return resolveString(propertyResolver, SERVICE_PROPERTY_LABEL);
            }

            @Override
            public boolean factory() {
                return resolveBoolean(propertyResolver, SERVICE_PROPERTY_FACTORY_SERVICE);
            }

            @Override
            public String description_uri() {
                return resolveString(propertyResolver, SERVICE_PROPERTY_DESCRIPTION_URI);
            }

            @Override
            public String category() {
                return resolveString(propertyResolver, SERVICE_PROPERTY_CATEGORY);
            }
        };
    }

}