@Test @SuppressWarnings("all") public void testGetNameProperty() { Optional<?> nameValue = tested.getProperty(BEAN1, "nameField"); assertTrue(nameValue.isPresent()); DefinitionBindableProperty name = (DefinitionBindableProperty) nameValue.get(); assertEquals(BEAN1, name.getPojo()); assertEquals("nameField", name.getField()); }
@Override public Optional<?> getProperty(T pojo, String field) { DefinitionAdapterBindings b = bindings.get(pojo.getClass()); final int index = b.getPropertiesFieldNames().indexOf(field); if (index > -1) { final Boolean isTyped = b.getTypedPropertyFields().get(index); return isTyped ? Optional.ofNullable(getFieldValue(pojo, field)) : Optional.of(new DefinitionBindableProperty<>(pojo, field)); } else { return Optional.empty(); } }
BindableDefinitionAdapterImpl implements BindableDefinitionAdapter<T> { @Override public Optional<?> getProperty(T pojo, String field) { DefinitionAdapterBindings b = bindings.get(pojo.getClass()); final int index = b.getPropertiesFieldNames().indexOf(field); if (index > -1) { final Boolean isTyped = b.getTypedPropertyFields().get(index); return isTyped ? Optional.ofNullable(getFieldValue(pojo, field)) : Optional.of(new DefinitionBindableProperty<>(pojo, field)); } else { return Optional.empty(); } } }
BindableDefinitionAdapterImpl implements BindableDefinitionAdapter<T> { @Override public Optional<?> getProperty(T pojo, String field) { DefinitionAdapterBindings b = bindings.get(pojo.getClass()); final int index = b.getPropertiesFieldNames().indexOf(field); if (index > -1) { final Boolean isTyped = b.getTypedPropertyFields().get(index); return isTyped ? Optional.ofNullable(getFieldValue(pojo, field)) : Optional.of(new DefinitionBindableProperty<>(pojo, field)); } else { return Optional.empty(); } } private  BindableDefinitionAdapterImpl(StunnerTranslationService translationService,
                                          BindableAdapterFunctions functions,
                                          Map<Class<?>, DefinitionAdapterBindings> bindings); }
BindableDefinitionAdapterImpl implements BindableDefinitionAdapter<T> { @Override public Optional<?> getProperty(T pojo, String field) { DefinitionAdapterBindings b = bindings.get(pojo.getClass()); final int index = b.getPropertiesFieldNames().indexOf(field); if (index > -1) { final Boolean isTyped = b.getTypedPropertyFields().get(index); return isTyped ? Optional.ofNullable(getFieldValue(pojo, field)) : Optional.of(new DefinitionBindableProperty<>(pojo, field)); } else { return Optional.empty(); } } 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 Optional<?> getProperty(T pojo, String field) { DefinitionAdapterBindings b = bindings.get(pojo.getClass()); final int index = b.getPropertiesFieldNames().indexOf(field); if (index > -1) { final Boolean isTyped = b.getTypedPropertyFields().get(index); return isTyped ? Optional.ofNullable(getFieldValue(pojo, field)) : Optional.of(new DefinitionBindableProperty<>(pojo, field)); } else { return Optional.empty(); } } 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();  }