Class DotGroovyFile

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Set<java.lang.String> scriptExtensions
      The file extensions to consider as Groovy files.
      private static long serialVersionUID  
      • Fields inherited from class java.io.File

        pathSeparator, pathSeparatorChar, separator, separatorChar
    • Constructor Summary

      Constructors 
      Constructor Description
      DotGroovyFile​(java.io.File file)
      A convenience constructor to turn a regular file into a DotGroovyFile.
      DotGroovyFile​(java.io.File parent, java.lang.String child)
      Constructs a new DotGroovyFile object with the specified parameters.
      DotGroovyFile​(java.lang.String pathname)
      Constructs a new DotGroovyFile object with the specified parameters.
      DotGroovyFile​(java.lang.String parent, java.lang.String child)
      Constructs a new DotGroovyFile object with the specified parameters.
      DotGroovyFile​(java.net.URI uri)
      Constructs a new DotGroovyFile object with the specified parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      A method to lie about the file extension and say it is ".groovy".
      java.util.Set<java.lang.String> getScriptExtensions()
      Gets the script extensions for this Groovy file.
      DotGroovyFile setScriptExtensions​(java.util.Set<java.lang.String> newScriptExtensions)
      Sets the script extensions for this Groovy file.
      • Methods inherited from class java.io.File

        canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURL
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • scriptExtensions

        private java.util.Set<java.lang.String> scriptExtensions
        The file extensions to consider as Groovy files.
    • Constructor Detail

      • DotGroovyFile

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

        public DotGroovyFile​(java.lang.String parent,
                             java.lang.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​(java.io.File parent,
                             java.lang.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​(java.net.URI uri)
        Constructs a new DotGroovyFile object with the specified parameters.
        Parameters:
        uri - URI to use to create DotGroovyFile
      • DotGroovyFile

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

      • getName

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

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

        public DotGroovyFile setScriptExtensions​(java.util.Set<java.lang.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)