public static class AnnotationTrait.Provider<T extends AnnotationTrait> extends AbstractTrait.Provider
Constructor and Description |
---|
Provider(ShapeId id,
java.util.function.Function<ObjectNode,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.Function<ObjectNode,T> traitFactory)
id
- ID of the trait being created.traitFactory
- Factory function 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.