Class SourceEntry

java.lang.Object
org.nuiton.i18n.plugin.parser.SourceEntry
Direct Known Subclasses:
I18nSourceEntry

public class SourceEntry extends Object
A simple model for a sourceEntry represents by a basedir and includes and/or exlucdes pattern. The class offers the usefull method : getIncludedFiles(File, String[], String[]) to obtain the list of files from the basedir directory which respects the includes and/or excludes patterns using an internal DirectoryScanner object. Note : The class does not extends DirectoryScanner since we DO not want to expose his methods.
Author:
Tony Chemit - chemit@codelutin.com
  • Field Details

    • specificGoal

      protected String specificGoal
      If you want to restrict use of the entry, set the class name goal to this property via setSpecificGoal(String). If let to null, all goals can use this entry.
    • basedir

      protected File basedir
    • includes

      protected String[] includes
    • excludes

      protected String[] excludes
    • files

      protected String[] files
      Files to be find
    • skipFiles

      protected String[] skipFiles
    • skipMessage

      protected String skipMessage
    • updater

      protected org.nuiton.io.FileUpdater updater
  • Constructor Details

    • SourceEntry

      public SourceEntry()
  • Method Details

    • getExcludes

      public String[] getExcludes()
    • setExcludes

      public void setExcludes(String[] excludes)
    • getIncludes

      public String[] getIncludes()
    • setIncludes

      public void setIncludes(String[] includes)
    • getBasedir

      public File getBasedir()
    • setBasedir

      public void setBasedir(File basedir)
    • getSpecificGoal

      public String getSpecificGoal()
    • setSpecificGoal

      public void setSpecificGoal(String specificGoal)
    • useForGoal

      public boolean useForGoal(String goal)
    • hasSrc

      public boolean hasSrc()
    • hasIncludes

      public boolean hasIncludes()
    • hasExcludes

      public boolean hasExcludes()
    • isFileUptodate

      public final boolean isFileUptodate(File file)
      Test if a file is up to date and not to be treated.
      Parameters:
      file - the file path to test
      Returns:
      true if file is up to date and do not need to be parsed
      See Also:
      • FileUpdater
    • getIncludedFiles

      public String[] getIncludedFiles(File defaultBasedir, String[] defaultIncludes, String[] defaultExcludes)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getIncludedFiles

      public String[] getIncludedFiles(File basedir, String[] defaultIncludes, String[] defaultExcludes, URLClassLoader loader, List<String> annotationClass, org.apache.maven.plugin.logging.Log log)
    • filterByAnnotation

      protected boolean filterByAnnotation(String file, URLClassLoader loader, List<String> annotationClass, org.apache.maven.plugin.logging.Log log)
    • getFQN

      protected String getFQN(String file)
    • getClass

      public Class<?> getClass(String file, URLClassLoader loader, org.apache.maven.plugin.logging.Log log)
    • getAnnotation

      public Annotation getAnnotation(String file, URLClassLoader loader, List<String> annotationClass, org.apache.maven.plugin.logging.Log log)
    • getClass

      public Class<?> getClass(File file, URLClassLoader loader, org.apache.maven.plugin.logging.Log log)
    • getAnnotation

      public Annotation getAnnotation(File file, URLClassLoader loader, List<String> annotationClass, org.apache.maven.plugin.logging.Log log)
    • getSkipMessage

      public String getSkipMessage()
    • getFiles

      public String[] getFiles()
    • getSkipFiles

      public String[] getSkipFiles()
    • getFoudFiles

      public int getFoudFiles()
    • getUpdater

      public org.nuiton.io.FileUpdater getUpdater()
    • setUpdater

      public void setUpdater(org.nuiton.io.FileUpdater updater)