Package ch.grengine.sources
Class SourcesUtil
java.lang.Object
ch.grengine.sources.SourcesUtil
Static utility methods around
Sources.- Since:
- 1.0
- Author:
- Alain Stalder, Made in Switzerland.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SourcessourceSetToSources(Set<Source> sourceSet, String name) converts a set of source to sources with the given name and with the default Groovy compiler factory.static SourcessourceSetToSources(Set<Source> sourceSet, String name, CompilerFactory compilerFactory) converts a set of source to sources with the given name and with the given compiler factory.static SourcessourceToSources(Source source) converts a source to sources with name set to the source ID and with the default Groovy compiler factory.static SourcessourceToSources(Source source, CompilerFactory compilerFactory) converts a source to sources with name set to the source ID and with the given compiler factory.
-
Method Details
-
sourceToSources
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
converts a source to sources with name set to the source ID and with the given compiler factory.- Parameters:
source- sourcecompilerFactory- compiler factory- Returns:
- sources
- Throws:
NullPointerException- if the source or the compiler factory is null- Since:
- 1.0
-
sourceSetToSources
converts a set of source to sources with the given name and with the default Groovy compiler factory.- Parameters:
sourceSet- set of sourcename- 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 sourcename- sources namecompilerFactory- compiler factory- Returns:
- sources
- Throws:
NullPointerException- if the source set, the name or the compiler factory is null- Since:
- 1.0
-