@Test public void testGetLabels() { final String[] labels = tested.getLabels(instance); assertArrayEquals(FooTestBean.LABELS.toArray(), labels); }
@Override @SuppressWarnings("all") public String[] getLabels(final T definition) { try { Object value = getAnnotatedFieldValue(definition, Labels.class); if (value instanceof Collection) { return (String[]) ((Collection) value).toArray(new String[((Collection) value).size()]); } return null != value ? (String[]) value : new String[0]; } catch (Exception e) { LOG.error("Error obtaining annotated labels for Definition with id " + getId(definition)); } return new String[0]; }
BackendDefinitionAdapter extends AbstractReflectAdapter<T> implements DefinitionAdapter<T>,
                   HasInheritance { @Override @SuppressWarnings("all") public String[] getLabels(final T definition) { try { Object value = getAnnotatedFieldValue(definition, Labels.class); if (value instanceof Collection) { return (String[]) ((Collection) value).toArray(new String[((Collection) value).size()]); } return null != value ? (String[]) value : new String[0]; } catch (Exception e) { LOG.error("Error obtaining annotated labels for Definition with id " + getId(definition)); } return new String[0]; } }
BackendDefinitionAdapter extends AbstractReflectAdapter<T> implements DefinitionAdapter<T>,
                   HasInheritance { @Override @SuppressWarnings("all") public String[] getLabels(final T definition) { try { Object value = getAnnotatedFieldValue(definition, Labels.class); if (value instanceof Collection) { return (String[]) ((Collection) value).toArray(new String[((Collection) value).size()]); } return null != value ? (String[]) value : new String[0]; } catch (Exception e) { LOG.error("Error obtaining annotated labels for Definition with id " + getId(definition)); } return new String[0]; } @Inject  BackendDefinitionAdapter(); }
BackendDefinitionAdapter extends AbstractReflectAdapter<T> implements DefinitionAdapter<T>,
                   HasInheritance { @Override @SuppressWarnings("all") public String[] getLabels(final T definition) { try { Object value = getAnnotatedFieldValue(definition, Labels.class); if (value instanceof Collection) { return (String[]) ((Collection) value).toArray(new String[((Collection) value).size()]); } return null != value ? (String[]) value : new String[0]; } catch (Exception e) { LOG.error("Error obtaining annotated labels for Definition with id " + getId(definition)); } return new String[0]; } @Inject  BackendDefinitionAdapter(); @Override boolean accepts(Class<?> pojo); @Override DefinitionId getId(final T definition); @Override String[] getPropertyFields(final T pojo); @Override String getMetaPropertyField(final T pojo,
                                       final PropertyMetaTypes metaType); @Override String getCategory(final T definition); @Override String getTitle(final T definition); @Override String getDescription(final T definition); @Override @SuppressWarnings("all") String[] getLabels(final T definition); @Override Class<? extends ElementFactory> getGraphFactoryType(final T definition); static Class<? extends ElementFactory> getGraphFactory(final Class<?> type); @Override String getBaseType(final Class<?> type); @Override String[] getTypes(final String baseType); }
BackendDefinitionAdapter extends AbstractReflectAdapter<T> implements DefinitionAdapter<T>,
                   HasInheritance { @Override @SuppressWarnings("all") public String[] getLabels(final T definition) { try { Object value = getAnnotatedFieldValue(definition, Labels.class); if (value instanceof Collection) { return (String[]) ((Collection) value).toArray(new String[((Collection) value).size()]); } return null != value ? (String[]) value : new String[0]; } catch (Exception e) { LOG.error("Error obtaining annotated labels for Definition with id " + getId(definition)); } return new String[0]; } @Inject  BackendDefinitionAdapter(); @Override boolean accepts(Class<?> pojo); @Override DefinitionId getId(final T definition); @Override String[] getPropertyFields(final T pojo); @Override String getMetaPropertyField(final T pojo,
                                       final PropertyMetaTypes metaType); @Override String getCategory(final T definition); @Override String getTitle(final T definition); @Override String getDescription(final T definition); @Override @SuppressWarnings("all") String[] getLabels(final T definition); @Override Class<? extends ElementFactory> getGraphFactoryType(final T definition); static Class<? extends ElementFactory> getGraphFactory(final Class<?> type); @Override String getBaseType(final Class<?> type); @Override String[] getTypes(final String baseType);  }