All Downloads are FREE. Search and download functionalities are using the official Maven repository.

restx.specs.HotReloadRestxSpecRepository Maven / Gradle / Ivy

There is a newer version: 1.2.0-rc2
Show newest version
package restx.specs;

import com.google.common.collect.ImmutableMap;
import restx.factory.Alternative;

public class HotReloadRestxSpecRepository extends RestxSpecRepository {
    public HotReloadRestxSpecRepository(RestxSpecLoader specLoader) {
        super(specLoader);
    }

    @Override
    synchronized ImmutableMap findAllSpecs() {
        return ImmutableMap.copyOf(buildSpecsMap(true));
    }

    @Alternative(to = RestxSpecRepository.class)
    @restx.factory.When(name="restx.mode", value="dev")
    public static class DevRestxSpecRepository extends HotReloadRestxSpecRepository {
        public DevRestxSpecRepository(RestxSpecLoader specLoader) {
            super(specLoader);
        }
    }

    @Alternative(to = RestxSpecRepository.class)
    @restx.factory.When(name="restx.mode", value="test")
    public static class TestRestxSpecRepository extends HotReloadRestxSpecRepository {
        public TestRestxSpecRepository(RestxSpecLoader specLoader) {
            super(specLoader);
        }
    }

    @Alternative(to = RestxSpecRepository.class)
    @restx.factory.When(name="restx.mode", value="infinirest")
    public static class InfinirestRestxSpecRepository extends HotReloadRestxSpecRepository {
        public InfinirestRestxSpecRepository(RestxSpecLoader specLoader) {
            super(specLoader);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy