Class DefaultKeywordSubstitutionModeClassifier

All Implemented Interfaces:

public class DefaultKeywordSubstitutionModeClassifier
extends java.lang.Object
implements KeywordSubstitutionModeClassifier

Classifies the keyword substitution modes for files. It is possible to explicitly set the keyword mode for a particular file. If this has not been done then it will determine if the file is binary by comparing it's name against a set of patterns for binary files. These patterns are stored in the "binaryFiles" setting. If this has not been set then default patterns will be used for binary files.

Constructor Summary
DefaultKeywordSubstitutionModeClassifier(Settings settings)
Method Summary
 void dispose()
          Disposes of this object.
 KeywordSubstitutionMode getDefaultKeywordSubstitutionModeForTextFiles()
 KeywordSubstitutionMode getKeywordSubstitutionMode( file)
          Determines what keyword expansion mode should be used for the specified file.
 void setDefaultKeywordSubstitutionModeForTextFiles(KeywordSubstitutionMode mode)
 void setKeywordSubstitutionMode( file, KeywordSubstitutionMode mode)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public DefaultKeywordSubstitutionModeClassifier(Settings settings)


public DefaultKeywordSubstitutionModeClassifier()
Method Detail


public void dispose()
Disposes of this object.


public KeywordSubstitutionMode getKeywordSubstitutionMode( file)
Determines what keyword expansion mode should be used for the specified file. If this has not been set using setKeywordSubstitutionMode then this method will detrmine if the file is binary from a set of patterns defined in a setting called "binaryFiles". If this setting has not been specified then some default patterns will be used.
Specified by:
getKeywordSubstitutionMode in interface KeywordSubstitutionModeClassifier


public void setKeywordSubstitutionMode( file,
                                       KeywordSubstitutionMode mode)


public KeywordSubstitutionMode getDefaultKeywordSubstitutionModeForTextFiles()


public void setDefaultKeywordSubstitutionModeForTextFiles(KeywordSubstitutionMode mode)