public ZzzzzzAttributeProvider(NodeRendererContext context) {
    DataHolder options = context.getOptions();
    this.localOnlyTargetClass = options.get(ZzzzzzExtension.LOCAL_ONLY_TARGET_CLASS);
    this.missingTargetClass = options.get(ZzzzzzExtension.MISSING_TARGET_CLASS);

    this.nodeAdapter =
        new AttributeProviderAdapter(
            new AttributeProvidingHandler<>(Image.class, this::setLinkAttributes),
            new AttributeProvidingHandler<>(ImageRef.class, this::setLinkAttributes),
            new AttributeProvidingHandler<>(LinkRef.class, this::setLinkAttributes),
            new AttributeProvidingHandler<>(Link.class, this::setLinkAttributes));
  }
Exemplo n.º 2
0
 public SpecExampleOptions(DataHolder options) {
   this.renderHtml = options.get(SpecExampleExtension.SPEC_EXAMPLE_RENDER_RAW_HTML);
   this.renderAs = options.get(SpecExampleExtension.SPEC_EXAMPLE_RENDER_AS);
   this.exampleBreak = options.get(SpecExampleExtension.SPEC_EXAMPLE_BREAK);
   this.typeBreak = options.get(SpecExampleExtension.SPEC_TYPE_BREAK);
   this.optionNodes = options.get(SpecExampleExtension.SPEC_OPTION_NODES);
   this.renderedHtmlPrefix = options.get(SpecExampleExtension.SPEC_EXAMPLE_RENDERED_HTML_PREFIX);
   this.renderedHtmlSuffix = options.get(SpecExampleExtension.SPEC_EXAMPLE_RENDERED_HTML_SUFFIX);
 }