Package com.vaadin.ui.declarative
Class Design.DefaultComponentFactory
- java.lang.Object
-
- com.vaadin.ui.declarative.Design.DefaultComponentFactory
-
- All Implemented Interfaces:
Design.ComponentFactory
,Serializable
- Enclosing class:
- Design
public static class Design.DefaultComponentFactory extends Object implements Design.ComponentFactory
Default implementation ofDesign.ComponentFactory
, usingClass.forName(className).newInstance()
for finding the component class and creating a component instance.- Since:
- 7.4.1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultComponentFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Component
createComponent(String fullyQualifiedClassName, DesignContext context)
Creates a component based on the fully qualified name derived from the tag name in the design.protected Class<? extends Component>
resolveComponentClass(String qualifiedClassName, DesignContext context)
Resolves a component class based on the fully qualified name of the class.
-
-
-
Method Detail
-
createComponent
public Component createComponent(String fullyQualifiedClassName, DesignContext context)
Description copied from interface:Design.ComponentFactory
Creates a component based on the fully qualified name derived from the tag name in the design.- Specified by:
createComponent
in interfaceDesign.ComponentFactory
- Parameters:
fullyQualifiedClassName
- the fully qualified name of the component to createcontext
- the design context for which the component is created- Returns:
- a newly created component
-
resolveComponentClass
protected Class<? extends Component> resolveComponentClass(String qualifiedClassName, DesignContext context)
Resolves a component class based on the fully qualified name of the class.- Parameters:
qualifiedClassName
- the fully qualified name of the resolved classcontext
- the design context for which the class is resolved- Returns:
- a component class object representing the provided class name
-
-