This question already has an answer here:
Visualforce has initialization of visualforce components in apex. For example MyCustomComponent component: ApexPages.Component customComponent = new Component.c.MyCustomComponent();
Is that possible to pass dynamically the component name instead of using Component.c.MyCustomComponent? I want to build a method that can get component name dynamically from the custom setting and initialize new ApexPages.Component.