@Test public void baseTypeParentTest() { String baseType = tested.getBaseType(FooTestBeanBaseParent.class); assertEquals(baseType, BaseFooTestBean2.class.getName()); }
@Override public String getBaseType(final Class<?> type) { return Optional.ofNullable(type) .filter(t -> !t.isPrimitive()) .filter(t -> Objects.nonNull(getClassAnnotation(t, Definition.class))) .map(this::findBaseParent) .map(BackendDefinitionAdapter::getDefinitionId) .orElse(null); }
BackendDefinitionAdapter extends AbstractReflectAdapter<T> implements DefinitionAdapter<T>,
                   HasInheritance { @Override public String getBaseType(final Class<?> type) { return Optional.ofNullable(type) .filter(t -> !t.isPrimitive()) .filter(t -> Objects.nonNull(getClassAnnotation(t, Definition.class))) .map(this::findBaseParent) .map(BackendDefinitionAdapter::getDefinitionId) .orElse(null); } }
BackendDefinitionAdapter extends AbstractReflectAdapter<T> implements DefinitionAdapter<T>,
                   HasInheritance { @Override public String getBaseType(final Class<?> type) { return Optional.ofNullable(type) .filter(t -> !t.isPrimitive()) .filter(t -> Objects.nonNull(getClassAnnotation(t, Definition.class))) .map(this::findBaseParent) .map(BackendDefinitionAdapter::getDefinitionId) .orElse(null); } @Inject  BackendDefinitionAdapter(); }
BackendDefinitionAdapter extends AbstractReflectAdapter<T> implements DefinitionAdapter<T>,
                   HasInheritance { @Override public String getBaseType(final Class<?> type) { return Optional.ofNullable(type) .filter(t -> !t.isPrimitive()) .filter(t -> Objects.nonNull(getClassAnnotation(t, Definition.class))) .map(this::findBaseParent) .map(BackendDefinitionAdapter::getDefinitionId) .orElse(null); } @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 public String getBaseType(final Class<?> type) { return Optional.ofNullable(type) .filter(t -> !t.isPrimitive()) .filter(t -> Objects.nonNull(getClassAnnotation(t, Definition.class))) .map(this::findBaseParent) .map(BackendDefinitionAdapter::getDefinitionId) .orElse(null); } @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);  }