Package org.openhab.core.items
Interface ItemFactory
- All Known Implementing Classes:
CoreItemFactory
@NonNullByDefault
public interface ItemFactory
This Factory creates concrete instances of the known ItemTypes.
- Author:
- Thomas Eichstaedt-Engelen - Initial contribution
-
Method Summary
Modifier and TypeMethodDescription@Nullable ItemcreateItem(@Nullable String itemTypeName, String itemName) Creates a new Item instance of typeitemTypeNameand the nameitemNameString[]Returns the list of all supported ItemTypes of this Factory.
-
Method Details
-
createItem
Creates a new Item instance of typeitemTypeNameand the nameitemName- Parameters:
itemTypeName-itemName-- Returns:
- a new Item of type
itemTypeNameornullif no matching class is known.
-
getSupportedItemTypes
String[] getSupportedItemTypes()Returns the list of all supported ItemTypes of this Factory.- Returns:
- the supported ItemTypes
-