excelExporter.excelParser.dataModel

## Class FileExt

- java.lang.Object
- - java.io.File
  - - excelExporter.excelParser.dataModel.FileExt

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<java.io.File>

      public class FileExt
      extends java.io.File

  The Java class File already brings some valuable information about the name of a file and parts of it, which is accessible from a StringTemplate V4 template - but in this derived class it is even extended.

  See java.io.File The practice of code generation requires some more details on file names. Here's an extended class, which adds these to the Java File class in order to make this information easily accessible from a StringTemplate V4 template.

  Note, to fetch the information from the Java base class java.io.File you need to be aware of the way, the StringTemplate V4 engine accesses public methods of a class: The access is restricted to public methods with names starting with "get", followed by a capitalized character. The function must not have any function argument. From a template, such a function is accessed without the "get" and with lower case first character, see these examples:

  - `<info.output.canonicalFile>` to access `File.getCanonicalFile()` for the currently generated file

  - `<info.templateFile.absoluteFile>` to access `File.getAbsoluteFile()` for the currently applied template group file

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.lang.String` | `ext` The file name extension without the dot.
    `java.lang.String` | `mnm` The file name prefix or menmonic.
    `java.lang.String` | `nameStem` The file name stem, the name without path, menmonic and extension.
    `java.lang.String` | `rawName` The file name without extension (and without the separating dot).

    - ### Fields inherited from class java.io.File

      `pathSeparator, pathSeparatorChar, separator, separatorChar`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileExt(java.lang.String fName)` Split a file name into parts and store all details about the file name and path in public fields.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `toString()` The default representation of the file name in user feedback.

    - ### Methods inherited from class java.io.File

      `canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, 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, toURI, toURL`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### rawName

          public java.lang.String rawName

      The file name without extension (and without the separating dot). null if the name stem is blank (as in ".ext").

    - #### nameStem

          public java.lang.String nameStem

      The file name stem, the name without path, menmonic and extension. Does not include the dot and underscore, which separate mnemonic and extension. null if the name stem is blank (as in ".ext").

    - #### ext

          public java.lang.String ext

      The file name extension without the dot. null if there is no extension.

    - #### mnm

          public java.lang.String mnm

      The file name prefix or menmonic. It is defined as the matching characters of the first (true) group of the regular expression

      "(?i)^([a-z][a-z_0-9]*)_.+$"

      on the file name stem. If the regular expression doesn't match then this field is null.

      The use case of this file name part is to shape a kind of name space for global objects in plain C code. Normally, a three character menemonic ("mnm") of the file or module name is used and this will then prepend the names of all global objects in the generated C code.

  - ### Constructor Detail

    - #### FileExt

          public FileExt(java.lang.String fName)

      Split a file name into parts and store all details about the file name and path in public fields.
      Parameters:
        `fName` - The file name.

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      The default representation of the file name in user feedback.
      Overrides:
        `toString` in class `java.io.File`
      Returns:
        Get the file name with extension but without path.