com.vaadin.flow.internal.nodefeature.
Class NodeFeatureRegistry
A registry of node features that are available based on type.
For internal use only. May be renamed or removed in a future release.
Since:
1.0
Author:
Vaadin Ltd
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator<Class<? extends NodeFeature>>
Comparator for finding the priority order between node feature types.
-
Method Summary
Modifier and TypeMethodDescriptionstatic NodeFeature
create
(Class<? extends NodeFeature> nodeFeatureType, StateNode node) Creates a feature of the given type for a node.
static Class<? extends NodeFeature>
getFeature
(int featureId) Finds the node feature type corresponding to the give node feature id.
static Collection<Class<? extends NodeFeature>>
Gets all registered feature types.
static int
getId
(Class<? extends NodeFeature> nodeFeature) Gets the id of a node feature.
-
Field Details
-
PRIORITY_COMPARATOR
Comparator for finding the priority order between node feature types.
-
-
Method Details
-
create
Creates a feature of the given type for a node.
Parameters:
nodeFeatureType
- the type of the feature to createnode
- the node for which the feature should be createdReturns:
a newly created feature
-
getId
Gets the id of a node feature.
Parameters:
nodeFeature
- the node featureReturns:
the id of the node feature
-
getFeatures
Gets all registered feature types.
Returns:
an unmodifiable collection of feature types, not
null
-
getFeature
Finds the node feature type corresponding to the give node feature id.
Parameters:
featureId
- the feature id for which to get a node feature typeReturns:
the node feature type
-