Class PatternParserBuilder

  • Direct Known Subclasses:
    PatternParser.Builder

    public class PatternParserBuilder
    extends java.lang.Object
    Since:
    2.1
    • Constructor Detail

      • PatternParserBuilder

        public PatternParserBuilder()
    • Method Detail

      • withInjector

        public PatternParserBuilder withInjector​(com.google.inject.Injector injector)
        Provide a specific injector instance to use with this parser
      • withLibrary

        public PatternParserBuilder withLibrary​(org.eclipse.emf.common.util.URI libraryURI)
        Provide an URI to a VQL file that can be used as a library.
      • withLibrary

        public PatternParserBuilder withLibrary​(org.eclipse.emf.common.util.URI libraryURI,
                                                java.util.Collection<IQuerySpecification<?>> specifications)
        Provide an URI to a VQL file that can be used as a library, together with a set of query specifications already created from this library. This can be used to include the generated query specifications for the given library.
      • withUnusedURIComputer

        public PatternParserBuilder withUnusedURIComputer​(java.util.function.BiFunction<org.eclipse.emf.ecore.resource.ResourceSet,​java.lang.String,​org.eclipse.emf.common.util.URI> unusedURIComputer)
        Since:
        2.1
      • withClassLoader

        public PatternParserBuilder withClassLoader​(java.lang.ClassLoader classLoader)
        Sets a custom classloader for resolving the types in check and eval expressions. If no custom classloader is set, the one use to load the type PatternParserBuilder is used.
        Since:
        2.4
      • build

        public PatternParser build()
        Initializes the pattern parser instance
      • parse

        public PatternParsingResults parse​(java.lang.String text)
        Creates a single-use pattern parser instance and collects the parsing results for the selected text, then the forgets the used parser instance.