Package org.nuiton.i18n.plugin.parser
Class SourceEntry
java.lang.Object
org.nuiton.i18n.plugin.parser.SourceEntry
- Direct Known Subclasses:
I18nSourceEntry
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 Summary
FieldsModifier and TypeFieldDescriptionprotected Fileprotected String[]protected String[]Files to be findprotected String[]protected String[]protected Stringprotected StringIf you want to restrict use of the entry, set the class name goal to this property viasetSpecificGoal(String).protected org.nuiton.io.FileUpdater -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanfilterByAnnotation(String file, URLClassLoader loader, List<String> annotationClass, org.apache.maven.plugin.logging.Log log) getAnnotation(File file, URLClassLoader loader, List<String> annotationClass, org.apache.maven.plugin.logging.Log log) getAnnotation(String file, URLClassLoader loader, List<String> annotationClass, org.apache.maven.plugin.logging.Log log) Class<?> getClass(File file, URLClassLoader loader, org.apache.maven.plugin.logging.Log log) Class<?> getClass(String file, URLClassLoader loader, org.apache.maven.plugin.logging.Log log) String[]String[]getFiles()intprotected StringString[]getIncludedFiles(File defaultBasedir, String[] defaultIncludes, String[] defaultExcludes) String[]getIncludedFiles(File basedir, String[] defaultIncludes, String[] defaultExcludes, URLClassLoader loader, List<String> annotationClass, org.apache.maven.plugin.logging.Log log) String[]String[]org.nuiton.io.FileUpdaterbooleanbooleanbooleanhasSrc()final booleanisFileUptodate(File file) Test if a file is up to date and not to be treated.voidsetBasedir(File basedir) voidsetExcludes(String[] excludes) voidsetIncludes(String[] includes) voidsetSpecificGoal(String specificGoal) voidsetUpdater(org.nuiton.io.FileUpdater updater) toString()booleanuseForGoal(String goal)
-
Field Details
-
specificGoal
If you want to restrict use of the entry, set the class name goal to this property viasetSpecificGoal(String). If let tonull, all goals can use this entry. -
basedir
-
includes
-
excludes
-
files
Files to be find -
skipFiles
-
skipMessage
-
updater
protected org.nuiton.io.FileUpdater updater
-
-
Constructor Details
-
SourceEntry
public SourceEntry()
-
-
Method Details
-
getExcludes
-
setExcludes
-
getIncludes
-
setIncludes
-
getBasedir
-
setBasedir
-
getSpecificGoal
-
setSpecificGoal
-
useForGoal
-
hasSrc
public boolean hasSrc() -
hasIncludes
public boolean hasIncludes() -
hasExcludes
public boolean hasExcludes() -
isFileUptodate
Test if a file is up to date and not to be treated.- Parameters:
file- the file path to test- Returns:
trueif file is up to date and do not need to be parsed- See Also:
-
getIncludedFiles
-
toString
-
getIncludedFiles
-
filterByAnnotation
protected boolean filterByAnnotation(String file, URLClassLoader loader, List<String> annotationClass, org.apache.maven.plugin.logging.Log log) -
getFQN
-
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
-
getAnnotation
public Annotation getAnnotation(File file, URLClassLoader loader, List<String> annotationClass, org.apache.maven.plugin.logging.Log log) -
getSkipMessage
-
getFiles
-
getSkipFiles
-
getFoudFiles
public int getFoudFiles() -
getUpdater
public org.nuiton.io.FileUpdater getUpdater() -
setUpdater
public void setUpdater(org.nuiton.io.FileUpdater updater)
-