public IFhirVersion getVersionImplementation() { if (!isPresentOnClasspath()) { throw new IllegalStateException("Version " + name() + " is not present on classpath"); } if (myVersionImplementation == null) { try { myVersionImplementation = (IFhirVersion) Class.forName(myVersionClass).newInstance(); } catch (Exception e) { throw new InternalErrorException("Failed to instantiate FHIR version " + name(), e); } } return myVersionImplementation; }
if (!theVersion.isPresentOnClasspath()) { throw new IllegalStateException(getLocalizer().getMessage(FhirContext.class, "noStructuresForSpecifiedVersion", theVersion.name())); } else if (FhirVersionEnum.DSTU2.isPresentOnClasspath()) { myVersion = FhirVersionEnum.DSTU2.getVersionImplementation(); } else if (FhirVersionEnum.DSTU2_HL7ORG.isPresentOnClasspath()) { myVersion = FhirVersionEnum.DSTU2_HL7ORG.getVersionImplementation(); } else if (FhirVersionEnum.DSTU2_1.isPresentOnClasspath()) { myVersion = FhirVersionEnum.DSTU2_1.getVersionImplementation(); } else if (FhirVersionEnum.DSTU3.isPresentOnClasspath()) { myVersion = FhirVersionEnum.DSTU3.getVersionImplementation(); } else if (FhirVersionEnum.R4.isPresentOnClasspath()) { myVersion = FhirVersionEnum.R4.getVersionImplementation(); } else {
public IFhirVersion getVersionImplementation() { if (!isPresentOnClasspath()) { throw new IllegalStateException("Version " + name() + " is not present on classpath"); } if (myVersionImplementation == null) { try { myVersionImplementation = (IFhirVersion) Class.forName(myVersionClass).newInstance(); } catch (Exception e) { throw new InternalErrorException("Failed to instantiate FHIR version " + name(), e); } } return myVersionImplementation; }
if (!theVersion.isPresentOnClasspath()) { throw new IllegalStateException(getLocalizer().getMessage(FhirContext.class, "noStructuresForSpecifiedVersion", theVersion.name())); } else if (FhirVersionEnum.DSTU2.isPresentOnClasspath()) { myVersion = FhirVersionEnum.DSTU2.getVersionImplementation(); } else if (FhirVersionEnum.DSTU2_HL7ORG.isPresentOnClasspath()) { myVersion = FhirVersionEnum.DSTU2_HL7ORG.getVersionImplementation(); } else if (FhirVersionEnum.DSTU2_1.isPresentOnClasspath()) { myVersion = FhirVersionEnum.DSTU2_1.getVersionImplementation(); } else if (FhirVersionEnum.DSTU3.isPresentOnClasspath()) { myVersion = FhirVersionEnum.DSTU3.getVersionImplementation(); } else if (FhirVersionEnum.R4.isPresentOnClasspath()) { myVersion = FhirVersionEnum.R4.getVersionImplementation(); } else {