@Test public void testGetMetaTypes() { String nameField = tested.getMetaPropertyField(BEAN1, PropertyMetaTypes.NAME); assertEquals("nameField", nameField); String widthField = tested.getMetaPropertyField(BEAN1, PropertyMetaTypes.WIDTH); assertNull(widthField); String heightField = tested.getMetaPropertyField(BEAN1, PropertyMetaTypes.HEIGHT); assertNull(heightField); String radiusField = tested.getMetaPropertyField(BEAN1, PropertyMetaTypes.RADIUS); assertNull(radiusField); String idField = tested.getMetaPropertyField(BEAN1, PropertyMetaTypes.ID); assertNull(idField); }
@Override public String getMetaPropertyField(T pojo, PropertyMetaTypes type) { final int index = bindings.get(pojo.getClass()).getMetaTypes().getIndex(type); return index > -1 ? getPropertyFields(pojo)[index] : null; }
BindableDefinitionAdapterImpl implements BindableDefinitionAdapter<T> { @Override public String getMetaPropertyField(T pojo, PropertyMetaTypes type) { final int index = bindings.get(pojo.getClass()).getMetaTypes().getIndex(type); return index > -1 ? getPropertyFields(pojo)[index] : null; } }
BindableDefinitionAdapterImpl implements BindableDefinitionAdapter<T> { @Override public String getMetaPropertyField(T pojo, PropertyMetaTypes type) { final int index = bindings.get(pojo.getClass()).getMetaTypes().getIndex(type); return index > -1 ? getPropertyFields(pojo)[index] : null; } private  BindableDefinitionAdapterImpl(StunnerTranslationService translationService,
                                          BindableAdapterFunctions functions,
                                          Map<Class<?>, DefinitionAdapterBindings> bindings); }
BindableDefinitionAdapterImpl implements BindableDefinitionAdapter<T> { @Override public String getMetaPropertyField(T pojo, PropertyMetaTypes type) { final int index = bindings.get(pojo.getClass()).getMetaTypes().getIndex(type); return index > -1 ? getPropertyFields(pojo)[index] : null; } private  BindableDefinitionAdapterImpl(StunnerTranslationService translationService,
                                          BindableAdapterFunctions functions,
                                          Map<Class<?>, DefinitionAdapterBindings> bindings); static BindableDefinitionAdapterImpl<Object> create(StunnerTranslationService translationService,
                                                               BindableAdapterFunctions functions); static BindableDefinitionAdapterImpl<Object> create(StunnerTranslationService translationService,
                                                               BindableAdapterFunctions functions,
                                                               Map<Class<?>, DefinitionAdapterBindings> bindings); @Override void addBindings(Class<?> type, DefinitionAdapterBindings bindings); @Override DefinitionId getId(T pojo); @Override String getCategory(T pojo); @Override String getTitle(T pojo); @Override String getDescription(T pojo); @Override @SuppressWarnings("all") String[] getLabels(T pojo); @Override String[] getPropertyFields(T pojo); @Override Optional<?> getProperty(T pojo, String field); @Override String getMetaPropertyField(T pojo, PropertyMetaTypes type); @Override String getBaseType(Class<?> type); @Override String[] getTypes(String baseType); @Override Class<? extends ElementFactory> getGraphFactoryType(T pojo); @Override @SuppressWarnings("all") Class<? extends ElementFactory> getGraphFactory(Class<?> type); @Override boolean accepts(Class<?> type); @Override int getPriority(); }
BindableDefinitionAdapterImpl implements BindableDefinitionAdapter<T> { @Override public String getMetaPropertyField(T pojo, PropertyMetaTypes type) { final int index = bindings.get(pojo.getClass()).getMetaTypes().getIndex(type); return index > -1 ? getPropertyFields(pojo)[index] : null; } private  BindableDefinitionAdapterImpl(StunnerTranslationService translationService,
                                          BindableAdapterFunctions functions,
                                          Map<Class<?>, DefinitionAdapterBindings> bindings); static BindableDefinitionAdapterImpl<Object> create(StunnerTranslationService translationService,
                                                               BindableAdapterFunctions functions); static BindableDefinitionAdapterImpl<Object> create(StunnerTranslationService translationService,
                                                               BindableAdapterFunctions functions,
                                                               Map<Class<?>, DefinitionAdapterBindings> bindings); @Override void addBindings(Class<?> type, DefinitionAdapterBindings bindings); @Override DefinitionId getId(T pojo); @Override String getCategory(T pojo); @Override String getTitle(T pojo); @Override String getDescription(T pojo); @Override @SuppressWarnings("all") String[] getLabels(T pojo); @Override String[] getPropertyFields(T pojo); @Override Optional<?> getProperty(T pojo, String field); @Override String getMetaPropertyField(T pojo, PropertyMetaTypes type); @Override String getBaseType(Class<?> type); @Override String[] getTypes(String baseType); @Override Class<? extends ElementFactory> getGraphFactoryType(T pojo); @Override @SuppressWarnings("all") Class<? extends ElementFactory> getGraphFactory(Class<?> type); @Override boolean accepts(Class<?> type); @Override int getPriority();  }