Class DotGroovyFile

    • Constructor Detail

      • DotGroovyFile

        public DotGroovyFile​(String pathname)
        Constructs a new DotGroovyFile object with the specified parameters.
        Parameters:
        pathname - Pathname to use to create DotGroovyFile
      • DotGroovyFile

        public DotGroovyFile​(String parent,
                             String child)
        Constructs a new DotGroovyFile object with the specified parameters.
        Parameters:
        parent - Parent pathname to use to create DotGroovyFile
        child - Child pathname to use to create DotGroovyFile
      • DotGroovyFile

        public DotGroovyFile​(File parent,
                             String child)
        Constructs a new DotGroovyFile object with the specified parameters.
        Parameters:
        parent - Parent file to use to create DotGroovyFile
        child - Child pathname to use to create DotGroovyFile
      • DotGroovyFile

        public DotGroovyFile​(URI uri)
        Constructs a new DotGroovyFile object with the specified parameters.
        Parameters:
        uri - URI to use to create DotGroovyFile
      • DotGroovyFile

        public DotGroovyFile​(File file)
        A convenience constructor to turn a regular file into a DotGroovyFile.
        Parameters:
        file - File to use to create DotGroovyFile
    • Method Detail

      • defaultScriptExtensions

        public static Set<String> defaultScriptExtensions()
        Default Groovy file extensions (currently '.groovy', '.gvy', '.gy', and '.gsh').
        Returns:
        The default Groovy file extensions
      • getName

        public String getName()
        A method to lie about the file extension and say it is ".groovy".
        Overrides:
        getName in class File
        Returns:
        Filename with forced .groovy extension
      • getScriptExtensions

        public Set<String> getScriptExtensions()
        Gets the script extensions for this Groovy file.
        Returns:
        The script extensions for this Groovy file
      • setScriptExtensions

        public DotGroovyFile setScriptExtensions​(Set<String> newScriptExtensions)
        Sets the script extensions for this Groovy file.
        Parameters:
        newScriptExtensions - The script extensions to set on this Groovy file
        Returns:
        This object (for fluent invocation)