Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public class ClinicalRecordsSdk {
private static ClinicalRecordsSdk instance;
@Inject ClinicalRecordsApi clinicalRecordsApi;
public static ClinicalRecordsApi getApiInstance() {
if (instance == null) {
createInstance();
}
return instance.clinicalRecordsApi;
}
private static void createInstance() {
ClinicalRecordsSdkComponent clinicalRecordsSdkComponent = initDagger();
instance = new ClinicalRecordsSdk();
clinicalRecordsSdkComponent.inject(instance);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment