Class StringTrait.Provider<T extends StringTrait>

    • Constructor Detail

      • Provider

        public Provider​(ShapeId id,
                        java.util.function.BiFunction<java.lang.String,​SourceLocation,​T> traitFactory)
        Parameters:
        id - The name of the trait being created.
        traitFactory - The factory 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.