[New] Added PolicyDef.valueOf(Class, String) override

This commit is contained in:
Robert von Burg 2020-02-19 22:22:51 +01:00
parent 3d745eb476
commit 119408d782
1 changed files with 14 additions and 0 deletions

View File

@ -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
*