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 Item
createItem
(@Nullable String itemTypeName, String itemName) Creates a new Item instance of typeitemTypeName
and the nameitemName
String[]
Returns the list of all supported ItemTypes of this Factory.
-
Method Details
-
createItem
Creates a new Item instance of typeitemTypeName
and the nameitemName
- Parameters:
itemTypeName
-itemName
-- Returns:
- a new Item of type
itemTypeName
ornull
if no matching class is known.
-
getSupportedItemTypes
String[] getSupportedItemTypes()Returns the list of all supported ItemTypes of this Factory.- Returns:
- the supported ItemTypes
-