I am creating a WildcardPermission programmatically from dynamically available data. Right now in order to do that, I have to format all of my data into a string and pass that to WildcardPermission¹s constructor which then parses it into essentially the structure that I already had. This seems counterproductive.
I notice that DomainPermission does something similar to what I am doing (although it¹s semantics are slightly different) and it also appears to have to format and then parse. I¹ve thought of a couple of workarounds, but they either involve tricking WildcardPermission into parsing a pointless string and then replacing everything (by modifying the List returned by getParts) or require changing WildcardPermission itself (to create the ³parts² List without invoking the parsing code, or simply adding methods for programmatic creation of the permission). I don¹t like the first one it still invokes unnecessary parsing code. So I have two questions: 1. Am I missing something? Is there a better way to do this? 2. If not, would this sort of modification to WildcardPermission be something that might be accepted? (Would not change any existing semantics, only potentially add a couple of methods.) If so, should I take the approach of providing an on-demand mechanism for creating the List, or the more comprehensive approach of adding some dynamic-building methods (addPart(String[]) sort of thing...). Thank you, Jared
