code: public static LicenseChoice resolveSpdxLicenseString(String licenseString) throws InvalidLicenseStringException {
          final LicenseChoice choice;
          final AnyLicenseInfo licenseInfo = LicenseInfoFactory.parseSPDXLicenseString(licenseString);
          if (licenseInfo instanceof SpdxListedLicense) {
              final SpdxListedLicense spdxListedLicense = (SpdxListedLicense)licenseInfo;
              choice = new LicenseChoice();
              choice.addLicense(createLicenseObject(spdxListedLicense));
              return choice;
          } else if (licenseInfo instanceof OrLaterOperator) {
              final OrLaterOperator orLaterOperator = (OrLaterOperator)licenseInfo;
              final SpdxListedLicense spdxListedLicense = (SpdxListedLicense)orLaterOperator.getLicense();
              choice = new LicenseChoice();
              choice.addLicense(createLicenseObject(spdxListedLicense));
              return choice;
          } else if (licenseInfo instanceof LicenseSet) {
              choice = new LicenseChoice();
              choice.setExpression(licenseString);
              return choice;
          }
          return null;
      }
docs: Given an SPDX license ID or expression, this method will resolve the license(s) and
  return a LicenseChoice object.
  @param licenseString the license string to resolve
  @return a LicenseChoice object if resolved, or null
  @throws InvalidLicenseStringException an exception while parsing the license string