@Test public void testGetPaletteGlyphWithConsumer() { assertEquals(DMNSVGGlyphFactory.BUSINESS_KNOWLEDGE_MODEL_PALETTE, shapeDef.getGlyph(BusinessKnowledgeModel.class, PaletteGlyphConsumer.class, DEFINITION_ID)); assertEquals(DMNSVGGlyphFactory.DECISION_PALETTE, shapeDef.getGlyph(Decision.class, PaletteGlyphConsumer.class, DEFINITION_ID)); assertEquals(DMNSVGGlyphFactory.DECISION_SERVICE_PALETTE, shapeDef.getGlyph(DecisionService.class, PaletteGlyphConsumer.class, DEFINITION_ID)); assertEquals(DMNSVGGlyphFactory.INPUT_DATA_PALETTE, shapeDef.getGlyph(InputData.class, PaletteGlyphConsumer.class, DEFINITION_ID)); assertEquals(DMNSVGGlyphFactory.KNOWLEDGE_SOURCE_PALETTE, shapeDef.getGlyph(KnowledgeSource.class, PaletteGlyphConsumer.class, DEFINITION_ID)); assertEquals(DMNSVGGlyphFactory.TEXT_ANNOTATION_PALETTE, shapeDef.getGlyph(TextAnnotation.class, PaletteGlyphConsumer.class, DEFINITION_ID)); assertEquals(true, shapeDef.getGlyph(DMNViewDefinition.class, PaletteGlyphConsumer.class, DEFINITION_ID) instanceof ShapeGlyph); }
@Override public Glyph getGlyph(final Class<? extends DMNViewDefinition> type, final String defId) { return GLYPHS_TOOLBOX.computeIfAbsent(type, (t) -> ShapeGlyph.create()); }
DMNSVGShapeDefImpl implements DMNSVGShapeDef<DMNViewDefinition, DMNSVGViewFactory> { @Override public Glyph getGlyph(final Class<? extends DMNViewDefinition> type, final String defId) { return GLYPHS_TOOLBOX.computeIfAbsent(type, (t) -> ShapeGlyph.create()); } }
DMNSVGShapeDefImpl implements DMNSVGShapeDef<DMNViewDefinition, DMNSVGViewFactory> { @Override public Glyph getGlyph(final Class<? extends DMNViewDefinition> type, final String defId) { return GLYPHS_TOOLBOX.computeIfAbsent(type, (t) -> ShapeGlyph.create()); }  }
DMNSVGShapeDefImpl implements DMNSVGShapeDef<DMNViewDefinition, DMNSVGViewFactory> { @Override public Glyph getGlyph(final Class<? extends DMNViewDefinition> type, final String defId) { return GLYPHS_TOOLBOX.computeIfAbsent(type, (t) -> ShapeGlyph.create()); }  @Override Class<DMNSVGViewFactory> getViewFactoryType(); @Override SVGShapeView<?> newViewInstance(final DMNSVGViewFactory factory,
                                           final DMNViewDefinition bean); @Override Glyph getGlyph(final Class<? extends DMNViewDefinition> type,
                          final String defId); @Override Glyph getGlyph(final Class<? extends DMNViewDefinition> type,
                          final Class<? extends ShapeFactory.GlyphConsumer> consumer,
                          final String defId); }
DMNSVGShapeDefImpl implements DMNSVGShapeDef<DMNViewDefinition, DMNSVGViewFactory> { @Override public Glyph getGlyph(final Class<? extends DMNViewDefinition> type, final String defId) { return GLYPHS_TOOLBOX.computeIfAbsent(type, (t) -> ShapeGlyph.create()); }  @Override Class<DMNSVGViewFactory> getViewFactoryType(); @Override SVGShapeView<?> newViewInstance(final DMNSVGViewFactory factory,
                                           final DMNViewDefinition bean); @Override Glyph getGlyph(final Class<? extends DMNViewDefinition> type,
                          final String defId); @Override Glyph getGlyph(final Class<? extends DMNViewDefinition> type,
                          final Class<? extends ShapeFactory.GlyphConsumer> consumer,
                          final String defId); static final SVGShapeViewResources<DMNDefinition, DMNSVGViewFactory> VIEW_RESOURCES; static final Map<Class<? extends DMNDefinition>, Glyph> GLYPHS_TOOLBOX; static final Map<Class<? extends DMNDefinition>, Glyph> GLYPHS_PALETTE; }