Class SourcesUtil

java.lang.Object
ch.grengine.sources.SourcesUtil

public class SourcesUtil extends Object
Static utility methods around Sources.
Since:
1.0
Author:
Alain Stalder, Made in Switzerland.
  • Method Details

    • sourceToSources

      public static Sources sourceToSources(Source source)
      converts a source to sources with name set to the source ID and with the default Groovy compiler factory.
      Parameters:
      source - source
      Returns:
      sources
      Throws:
      NullPointerException - if the source is null
      Since:
      1.0
    • sourceToSources

      public static Sources sourceToSources(Source source, CompilerFactory compilerFactory)
      converts a source to sources with name set to the source ID and with the given compiler factory.
      Parameters:
      source - source
      compilerFactory - compiler factory
      Returns:
      sources
      Throws:
      NullPointerException - if the source or the compiler factory is null
      Since:
      1.0
    • sourceSetToSources

      public static Sources sourceSetToSources(Set<Source> sourceSet, String name)
      converts a set of source to sources with the given name and with the default Groovy compiler factory.
      Parameters:
      sourceSet - set of source
      name - sources name
      Returns:
      sources
      Throws:
      NullPointerException - if the source set or the name is null
      Since:
      1.0
    • sourceSetToSources

      public static Sources sourceSetToSources(Set<Source> sourceSet, String name, CompilerFactory compilerFactory)
      converts a set of source to sources with the given name and with the given compiler factory.
      Parameters:
      sourceSet - set of source
      name - sources name
      compilerFactory - compiler factory
      Returns:
      sources
      Throws:
      NullPointerException - if the source set, the name or the compiler factory is null
      Since:
      1.0