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

io.lambdacube.aspecio.internal.service.ServiceScope Maven / Gradle / Ivy

There is a newer version: 1.0.3
Show newest version
package io.lambdacube.aspecio.internal.service;

public enum ServiceScope {
    SINGLETON("singleton"), BUNDLE("bundle"), PROTOTYPE("prototype");

    private final String value;

    ServiceScope(String value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return value;
    }

    public static ServiceScope fromString(String s) {
        if (s == null) {
            return SINGLETON;
        }
        switch (s) {
        case "bundle":
            return BUNDLE;
        case "prototype":
            return PROTOTYPE;
        default:
            return SINGLETON;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy