Class SourceFileExtension


  • public class SourceFileExtension
    extends java.lang.Object
    This class is a container that holds a single file extension and its description for source file that is supported for the compiler.

    The file extension should have the form without the starting dot ("."), i.e. "asm" instead of ".asm". The extension will be taken in case insensitive manner.

    The description of the extension should be in any form.

    Immutable object.

    • Constructor Summary

      Constructors 
      Constructor Description
      SourceFileExtension​(java.lang.String extension, java.lang.String description)
      Creates an instance of the class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()
      Return raw file-extension description as it was passed.
      java.lang.String getExtension()
      Return the file extension.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SourceFileExtension

        public SourceFileExtension​(java.lang.String extension,
                                   java.lang.String description)
        Creates an instance of the class.
        Parameters:
        extension - Case insensitive file extension of the file, without the starting dot (example: "asm", but not ".asm").
        description - The description of the file extension.
    • Method Detail

      • getExtension

        public java.lang.String getExtension()
        Return the file extension.
        Returns:
        File extension
      • getDescription

        public java.lang.String getDescription()
        Return raw file-extension description as it was passed.
        Returns:
        file-extension description