@Test public void verifyCodeFieldsOnlyImplementationIsCodeFieldsOnly() throws ComponentLookupException { AbstractComplexController<List<VocabularyProperty>> controller = (AbstractComplexController<List<VocabularyProperty>>) this.codeFieldImplMocker.getComponentUnderTest(); Assert.assertTrue(controller.isCodeFieldsOnly()); }
protected boolean isCodeFieldsOnly() { Type type = this.getClass().getGenericSuperclass(); if (!(type instanceof ParameterizedType)) { return false; } ParameterizedType t = (ParameterizedType) type; return new DefaultParameterizedType(null, List.class, VocabularyProperty.class).equals( t.getActualTypeArguments()[0]); }
AbstractComplexController implements PatientDataController<T> { protected boolean isCodeFieldsOnly() { Type type = this.getClass().getGenericSuperclass(); if (!(type instanceof ParameterizedType)) { return false; } ParameterizedType t = (ParameterizedType) type; return new DefaultParameterizedType(null, List.class, VocabularyProperty.class).equals( t.getActualTypeArguments()[0]); } }
AbstractComplexController implements PatientDataController<T> { protected boolean isCodeFieldsOnly() { Type type = this.getClass().getGenericSuperclass(); if (!(type instanceof ParameterizedType)) { return false; } ParameterizedType t = (ParameterizedType) type; return new DefaultParameterizedType(null, List.class, VocabularyProperty.class).equals( t.getActualTypeArguments()[0]); }  }
AbstractComplexController implements PatientDataController<T> { protected boolean isCodeFieldsOnly() { Type type = this.getClass().getGenericSuperclass(); if (!(type instanceof ParameterizedType)) { return false; } ParameterizedType t = (ParameterizedType) type; return new DefaultParameterizedType(null, List.class, VocabularyProperty.class).equals( t.getActualTypeArguments()[0]); }  @Override @SuppressWarnings("unchecked") PatientData<T> load(Patient patient); @Override void writeJSON(Patient patient, JSONObject json, Collection<String> selectedFieldNames); @Override void writeJSON(Patient patient, JSONObject json); @Override void save(Patient patient); @Override void save(@Nonnull final Patient patient, @Nonnull final PatientWritePolicy policy); @Override PatientData<T> readJSON(JSONObject json); }
AbstractComplexController implements PatientDataController<T> { protected boolean isCodeFieldsOnly() { Type type = this.getClass().getGenericSuperclass(); if (!(type instanceof ParameterizedType)) { return false; } ParameterizedType t = (ParameterizedType) type; return new DefaultParameterizedType(null, List.class, VocabularyProperty.class).equals( t.getActualTypeArguments()[0]); }  @Override @SuppressWarnings("unchecked") PatientData<T> load(Patient patient); @Override void writeJSON(Patient patient, JSONObject json, Collection<String> selectedFieldNames); @Override void writeJSON(Patient patient, JSONObject json); @Override void save(Patient patient); @Override void save(@Nonnull final Patient patient, @Nonnull final PatientWritePolicy policy); @Override PatientData<T> readJSON(JSONObject json);  }