org.nuiton.i18n.plugin.parser
Class AbstractFileParser

java.lang.Object
  extended by org.nuiton.i18n.plugin.parser.AbstractFileParser
All Implemented Interfaces:
FileParser
Direct Known Subclasses:
ParserJavaMojo.JavaFileParser, ParserXmlMojo.XmlFileParser

public abstract class AbstractFileParser
extends Object
implements FileParser

A abstract implementation of a FileParser with no logic.

Since:
1.2
Author:
tchemit

Constructor Summary
protected AbstractFileParser(org.apache.maven.plugin.logging.Log log, String encoding, org.nuiton.io.SortedProperties oldParser, boolean showTouchedFiles)
           
 
Method Summary
 void destroy()
          clean file parser.
protected  void finalize()
           
 org.apache.maven.plugin.logging.Log getLog()
          maven logger to use.
 org.nuiton.io.SortedProperties getResult()
          TODO As we do not used anylonger old language, we should directly TODO use only a set of keys, no need to keep i18n value...
 boolean isShowTouchedFiles()
           
 boolean isTouched()
           
protected  void registerKey(String key)
           
protected  void setTouched(boolean touched)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nuiton.i18n.plugin.parser.FileParser
parseFile, parseLine
 

Constructor Detail

AbstractFileParser

protected AbstractFileParser(org.apache.maven.plugin.logging.Log log,
                             String encoding,
                             org.nuiton.io.SortedProperties oldParser,
                             boolean showTouchedFiles)
Method Detail

isShowTouchedFiles

public boolean isShowTouchedFiles()
Specified by:
isShowTouchedFiles in interface FileParser
Returns:
true if should print on logger when file is touched

isTouched

public boolean isTouched()
Specified by:
isTouched in interface FileParser
Returns:
true if file was touched (says contains at least one i18n key)

getResult

public org.nuiton.io.SortedProperties getResult()
Description copied from interface: FileParser
TODO As we do not used anylonger old language, we should directly TODO use only a set of keys, no need to keep i18n value...

Specified by:
getResult in interface FileParser
Returns:
the results of i18n keys found for the given file

destroy

public void destroy()
Description copied from interface: FileParser
clean file parser.

Specified by:
destroy in interface FileParser

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable

getLog

public org.apache.maven.plugin.logging.Log getLog()
Description copied from interface: FileParser
maven logger to use.

Specified by:
getLog in interface FileParser
Returns:
the logger

registerKey

protected void registerKey(String key)

setTouched

protected void setTouched(boolean touched)


Copyright © 2007-2010 CodeLutin. All Rights Reserved.