Here you can find the source of getAuthzNameFromEntityName(String entityName, Collection
public static String getAuthzNameFromEntityName(String entityName, Collection<String> authzProvidersNames)
//package com.java2s; //License from project: Apache License import java.util.Collection; public class Main { public static String getAuthzNameFromEntityName(String entityName, Collection<String> authzProvidersNames) { String result = null;/*from w w w . j ava 2s. co m*/ if (entityName != null && entityName.contains("@")) { String lastPart = entityName.substring(entityName.lastIndexOf('@') + 1); result = authzProvidersNames.contains(lastPart) ? lastPart : null; } return result; } }