/** * Factory method to allow canonicalization of instances. Returns existing * instance or creates a new instance. */ public static InternalRole getRole(String name) { synchronized (roles) { InternalRole role = (InternalRole) roles.get(name); if (role == null) { role = new InternalRole(name); roles.put(name, role); } return role; } }
/** * Factory method to allow canonicalization of instances. Returns existing * instance or creates a new instance. */ public static InternalRole getRole(String name) { synchronized (roles) { InternalRole role = (InternalRole) roles.get(name); if (role == null) { role = new InternalRole(name); roles.put(name, role); } return role; } }