diff --git a/li.strolch.model/src/main/java/li/strolch/model/policy/PolicyDef.java b/li.strolch.model/src/main/java/li/strolch/model/policy/PolicyDef.java index dda551e11..20b7cc724 100644 --- a/li.strolch.model/src/main/java/li/strolch/model/policy/PolicyDef.java +++ b/li.strolch.model/src/main/java/li/strolch/model/policy/PolicyDef.java @@ -106,6 +106,20 @@ public abstract class PolicyDef { return sb.toString(); } + /** + * Returns a {@link PolicyDef} instance which handles the given type of XML Value + * + * @param type + * the type, using the {@link Class#getSimpleName()} to delegate to {@link #valueOf(String, String)} + * @param xmlValue + * the XML formatted value with the prefix denoting the {@link PolicyDef} type + * + * @return a {@link PolicyDef} instance which handles the given type of XML Value + */ + public static PolicyDef valueOf(Class type, String xmlValue) { + return valueOf(type.getSimpleName(), xmlValue); + } + /** * Returns a {@link PolicyDef} instance which handles the given type of XML Value *