Package org.cyclos.model
Class Submodules
- java.lang.Object
-
- org.cyclos.model.Submodules
-
-
Constructor Summary
Constructors Constructor Description Submodules()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Submoduleaggregate(Set<Submodule> submodules)Returns an instance aggregating all the given submodulesstatic Submoduleaggregate(Submodule... submodules)Returns an instance aggregating all the given submodulesstatic Set<Submodule>flatten(Submodule submodule)Flattens the given submodule, returning all submodules if it is an instance ofSubmodulesor the parameter in a singletonstatic Submodulefrom(String str)Returns the submodule for the given string, in the format [module.submodule].static SubmodulefromKey(String key)Returns the submodule for the given string, in the format [module.submodule.key].static intgetId(Submodule submodule)Returns an identifier for a given submodulestatic Map<String,Class<? extends PrefixedEnum>>getPrefixMapping()Returns the prefix mapping (submodules arePrefixedEnum)static Class<? extends Submodule>getSubmoduleClassFor(Module module)Returns the submodule enum class for the given modulestatic List<? extends Submodule>getSubmodulesFromModule(Module module)static StringqualifiedName(Submodule submodule)Returns the qualified name for the given submodule, that is: <MODULE>.<SUBMODULE>
-
-
-
Method Detail
-
aggregate
public static Submodule aggregate(Set<Submodule> submodules)
Returns an instance aggregating all the given submodules
-
aggregate
public static Submodule aggregate(Submodule... submodules)
Returns an instance aggregating all the given submodules
-
flatten
public static Set<Submodule> flatten(Submodule submodule)
Flattens the given submodule, returning all submodules if it is an instance ofSubmodulesor the parameter in a singleton
-
from
public static Submodule from(String str)
Returns the submodule for the given string, in the format [module.submodule].
-
fromKey
public static Submodule fromKey(String key)
Returns the submodule for the given string, in the format [module.submodule.key].
-
getId
public static int getId(Submodule submodule)
Returns an identifier for a given submodule
-
getPrefixMapping
public static Map<String,Class<? extends PrefixedEnum>> getPrefixMapping()
Returns the prefix mapping (submodules arePrefixedEnum)
-
getSubmoduleClassFor
public static Class<? extends Submodule> getSubmoduleClassFor(Module module)
Returns the submodule enum class for the given module
-
getSubmodulesFromModule
public static List<? extends Submodule> getSubmodulesFromModule(Module module)
-
-