[New] Added PolicyDef.valueOf(Class, String) override
This commit is contained in:
parent
3d745eb476
commit
119408d782
|
@ -106,6 +106,20 @@ public abstract class PolicyDef {
|
||||||
return sb.toString();
|
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
|
* Returns a {@link PolicyDef} instance which handles the given type of XML Value
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue