Open this page in the API Guide

ChangeLayerAction.checkNameGeneration Method

Since generating names is expensive, it should be done only on-demand.