Class AnnotationTrait.Provider<T extends AnnotationTrait>

    • Constructor Detail

      • Provider

        public Provider​(ShapeId id,
                        java.util.function.Function<ObjectNode,​T> traitFactory)
        Parameters:
        id - ID of the trait being created.
        traitFactory - Factory function used to create the trait.
    • Method Detail

      • createTrait

        public T createTrait​(ShapeId id,
                             Node value)
        Description copied from interface: TraitService
        Creates the trait from a node value.
        Parameters:
        id - The shape targeted by the trait.
        value - The value of the trait.
        Returns:
        Returns the created trait.