You can register styles object for later reference them directly. Parent
styles should be registered this way

@param style
@return
@throws DJBuilderException
359121
public DynamicReportBuilder addStyle(Style style) throws DJBuilderException {
        if (style.getName() == null) {
            throw new DJBuilderException("Invalid style. The style must have a name");
        }

        report.addStyle(style);

        return this;
    }
995477
def SetMarkerStyle(self, style):
        
        self._markerstyle = MarkerStyle(style)
        if isinstance(self, ROOT.TAttMarker):
            ROOT.TAttMarker.SetMarkerStyle(self, self._markerstyle('root'))
806775
def style(self, style):
        
        if style is None:
            self._remove_pStyle()
            return
        pStyle = self.get_or_add_pStyle()
        pStyle.val = style
616282
public function add(Style $style)
    {
        if (!$style->getTag()) {
            throw new LogicException('The tag of a style added to the style set must be set.');
        }

        $this->styles[$style->getTag()] = $style;
    }
1341725
public function setStyle($cssStyle) {
		if (!JString::startsWith($cssStyle, "panel"))
			$cssStyle="panel".$cssStyle;
		return $this->addToPropertyCtrl("class", $cssStyle, CssRef::Styles("panel"));
	}
1360479
public TableBuilder addOutlineBorder(BorderStyle style) {
		this.addBorder(0, 0, model.getRowCount(), model.getColumnCount(), OUTLINE, style);
		return this;
	}
495576
public final void setStyle(@NonNull final Style style) {
        Condition.INSTANCE.ensureNotNull(style, "The style may not be null");
        this.style = style;
        this.rawItems = null;
        notifyDataSetChanged();
    }
748224
public void setStyle(final TableStyle style) {
        this.stylesContainer.addPageStyle(style.getPageStyle());
        this.stylesContainer.addContentStyle(style);
        this.style = style;
    }
217774
public Style createStyle(final List<Rule> styleRules) {
        final Rule[] rulesArray = styleRules.toArray(new Rule[0]);
        final FeatureTypeStyle featureTypeStyle = this.styleBuilder.createFeatureTypeStyle(null, rulesArray);
        final Style style = this.styleBuilder.createStyle();
        style.featureTypeStyles().add(featureTypeStyle);
        return style;
    }
989068
public void addChildCellStyle(final TableCellStyle style, final TableCell.Type type) {
        this.odsElements.addChildCellStyle(style, type);
    }
1120957
public void setWidget (int row, int column, Widget widget, String style)
    {
        setWidget(row, column, widget);
        if (style != null) {
            getCellFormatter().setStyleName(row, column, style);
        }
    }
963624
public boolean setStyle(PolygonOptions polygonOptions, StyleRow style) {
        return StyleUtils.setStyle(polygonOptions, style, density);
    }
328837
public function setStyle($style)
    {
        $dir = ForumEnv::get('WEB_ROOT').'themes/'.$style.'/';
        if (!is_dir($dir)) {
            throw new RunBBException('The style '.$style.' doesn\'t exist');
        }

        if (is_file($dir . 'bootstrap.php')) {
            $vars = include_once $dir . 'bootstrap.php';
            // file exist but return nothing
            if (!is_array($vars)) {
                $vars = [];
            }
            foreach ($vars as $key => $assets) {
                if ($key === 'jsraw' || !in_array($key, ['js', 'jshead', 'css'])) {
                    continue;
                }
                foreach ($assets as $asset) {
                    $params = ($key === 'css') ? ['type' => 'text/css', 'rel' => 'stylesheet'] : (
                    ($key === 'js' || $key === 'jshead') ? ['type' => 'text/javascript'] : []
                    );
                    $this->addAsset($key, $asset, $params);
                }
            }
            $this->set('jsraw', isset($vars['jsraw']) ? $vars['jsraw'] : '');
        }

        if (isset($vars['themeTemplates']) && $vars['themeTemplates'] == true) {
            $templatesDir = ForumEnv::get('WEB_ROOT').'themes/'.$style.'/view';
        } else {
            $templatesDir = ForumEnv::get('FORUM_ROOT') . 'View/';
        }

        $this->set('style', (string) $style);

        $this->addTemplatesDirectory($templatesDir);
    }
993065
public boolean addStylesFontFaceContainerStyle(final FontFaceContainerStyle ffcStyle) {
        final FontFace fontFace = ffcStyle.getFontFace();
        if (fontFace != null) {
            this.fontFaces.add(fontFace);
        }
        return this.addStylesStyle(ffcStyle);
    }
1119653
public function setStyle($style) {
		$this->owner->ButtonStyle = trim(strtolower($style));
		return $this->owner;
	}
465905
public void setCaptionStyle(java.lang.String captionStyle) {
        getStateHelper().put(PropertyKeys.captionStyle, captionStyle);
    }
465287
public void add(SeqPattern style) {
    style.setGenerator(this);
    patterns.put(style.getLevel(), style);
  }