*
* @param input String with method mapping
* @return Method map
*/
private Map parse(String input) {
Permission permission = null;
String method = null;
int METHODS = 1;
int PERMISSIONS = 2;
int state = PERMISSIONS;
Map methodMap = new HashMap();
for (StringTokenizer stringTokenizer = new StringTokenizer(input, " \n{}", true);
stringTokenizer.hasMoreTokens();) {
String t = stringTokenizer.nextToken();
if (" ".equals(t) || "\n".equals(t)) {
// do nothing
} else if ("{".equals(t)) {
state = METHODS;
} else if ("}".equals(t)) {
state = PERMISSIONS;
} else if (state == PERMISSIONS) {
permission = new Permission(t);
} else if (state == METHODS) {
if (null != permission) {
method = t;
Set permissions;
if (methodMap.containsKey(method)) {