public static class StringListTrait.Provider<T extends StringListTrait> extends AbstractTrait.Provider
Constructor and Description |
---|
Provider(ShapeId id,
java.util.function.BiFunction<java.util.List<java.lang.String>,SourceLocation,T> traitFactory) |
Modifier and Type | Method and Description |
---|---|
T |
createTrait(ShapeId id,
Node value)
Creates the trait from a node value.
|
getShapeId
public Provider(ShapeId id, java.util.function.BiFunction<java.util.List<java.lang.String>,SourceLocation,T> traitFactory)
id
- The ID of the trait being created.traitFactory
- The factory used to create the trait.public T createTrait(ShapeId id, Node value)
TraitService
id
- The shape targeted by the trait.value
- The value of the trait.