Class EASyConfigFileFilter

  • All Implemented Interfaces:
    java.io.FileFilter

    public class EASyConfigFileFilter
    extends java.lang.Object
    implements java.io.FileFilter
    FileFilter for EASy config files (variability model, build scripts, and templates).
    Since:
    24.07.2012
    Author:
    El-Sharkawy
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean copyIVML  
      private boolean copyVIL  
      private boolean copyVTL  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accept​(java.io.File file)  
      private boolean considerIVMLFiles​(java.lang.String file)
      Checks whether the given file is an IVML file and should be considered.
      private boolean considerVILFiles​(java.lang.String file)
      Checks whether the given file is an VIL file and should be considered.
      private boolean considerVTLFiles​(java.lang.String file)
      Checks whether the given file is an VTL file and should be considered.
      private boolean isEASyConfigFile​(java.lang.String filename)
      Denotes whether a given filename is an IVML file.
      • Methods inherited from class java.lang.Object

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

      • copyIVML

        private boolean copyIVML
      • copyVIL

        private boolean copyVIL
      • copyVTL

        private boolean copyVTL
    • Constructor Detail

      • EASyConfigFileFilter

        public EASyConfigFileFilter​(Configuration.PathKind... elementsToCopy)
        Sole constructor for the EASyConfigFileFilter.
        Parameters:
        elementsToCopy - Specification which IVML, VIL, VTL files should be considered. If null or an empty array, all config files will be considered.
    • Method Detail

      • considerIVMLFiles

        private boolean considerIVMLFiles​(java.lang.String file)
        Checks whether the given file is an IVML file and should be considered.
        Parameters:
        file - The name of the file (in lower case).
        Returns:
        true if IVML files should be considered and the file is an IVML file, false otherwise.
      • considerVILFiles

        private boolean considerVILFiles​(java.lang.String file)
        Checks whether the given file is an VIL file and should be considered.
        Parameters:
        file - The name of the file (in lower case).
        Returns:
        true if VIL files should be considered and the file is an VIL file, false otherwise.
      • considerVTLFiles

        private boolean considerVTLFiles​(java.lang.String file)
        Checks whether the given file is an VTL file and should be considered.
        Parameters:
        file - The name of the file (in lower case).
        Returns:
        true if VTL files should be considered and the file is an VTL file, false otherwise.
      • isEASyConfigFile

        private boolean isEASyConfigFile​(java.lang.String filename)
        Denotes whether a given filename is an IVML file.
        Parameters:
        filename - The name of the file, which should be checked.
        Returns:
        true if the ending of the filename matches to a specified ivml file type, otherwise false.
      • accept

        public boolean accept​(java.io.File file)
        Specified by:
        accept in interface java.io.FileFilter