/** * Constructor. * * @param roleAuthority the role authority of this RoleSyntax. * @param roleName the role name of this RoleSyntax. */ public RoleSyntax(GeneralNames roleAuthority, GeneralName roleName) { if (roleName == null || roleName.getTagNo() != GeneralName.uniformResourceIdentifier || ((ASN1String) roleName.getName()).getString().equals("")) { throw new IllegalArgumentException( "the role name MUST be non empty and MUST " + "use the URI option of GeneralName"); } this.roleAuthority = roleAuthority; this.roleName = roleName; }