Class RulesComponentBuilder<B extends RulesComponentBuilder<?,​?>,​T>

    • Constructor Detail

      • RulesComponentBuilder

        public RulesComponentBuilder​(FromSourceLocation fromSourceLocation)
        Creates a builder with the given source location.
        Parameters:
        fromSourceLocation - the source location for the builder.
    • Method Detail

      • sourceLocation

        public B sourceLocation​(FromSourceLocation fromSourceLocation)
        Sets the source location for the builder.
        Parameters:
        fromSourceLocation - the source location to set.
        Returns:
        the updated builder.
      • javaLocation

        public static SourceLocation javaLocation()
        Returns the source code location of the caller. This is very helpful when determining where rules generated from Java-based builders originated.

        Library-local and JDK stack frames are discarded. If no relevant location can be found, `SourceLocation.none()` is returned.

        Returns:
        The SourceLocation.