net.sf.commonclipse
Class CCPluginPreferences

java.lang.Object
  extended by net.sf.commonclipse.CCPluginPreferences

public final class CCPluginPreferences
extends java.lang.Object

Provide access to parsed plugin preferences.

Version:
$Revision: 1.5 $ ($Author: fgiust $)
Author:
fgiust

Method Summary
 boolean addInstanceCheckToEquals()
          Add an instance equality check to equals method?
 boolean appendSuperToCompareTo()
          append super to compareTo method?
 boolean appendSuperToEquals()
          Append super to equals method?
 boolean appendSuperToHashcode()
          Append super to hashcode method?
 boolean appendSuperToToString()
          Append super to toString method?
 boolean dontAskOnOverwrite()
          Overwrite existing methods without confirmation?
protected  void evaluateExclusionList()
          Gets the CCPlugin.P_EXCLUDE preference from the preference store and generates a Pattern from it.
protected  void evaluateToStringStyle()
          Gets the CCPlugin.P_TOSTRING_STYLE preference from the preference store and parse it.
static java.util.regex.Pattern generateRegExp(java.lang.String stringList)
          Generate a single regular expression used to match excluded fields.
 java.util.regex.Pattern getExcludedFielsPattern()
          Returns the list of excluded fields/properties.
static CCPluginPreferences getPreferences()
          returns the instance of plugin preferences.
 java.lang.String getToStringStyleClassAndConstant()
          Gets the class.CONSTANT part of the custom toStringStyle.
 java.lang.String getToStringStyleQualifiedClass()
          Gets the package.class part of the custom toStringStyle.
 boolean useCustomToStringStyle()
          Use a custom toString style?
 boolean useFinalParameters()
          Use final parameters in generated methods?
 boolean useJavabeanToString()
          use javabean properties in toString() instead of fields?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPreferences

public static CCPluginPreferences getPreferences()
returns the instance of plugin preferences.

Returns:
single instance of CCPluginPreferences

evaluateToStringStyle

protected void evaluateToStringStyle()
Gets the CCPlugin.P_TOSTRING_STYLE preference from the preference store and parse it.


appendSuperToHashcode

public boolean appendSuperToHashcode()
Append super to hashcode method?

Returns:
true if appendSuper should be used

appendSuperToToString

public boolean appendSuperToToString()
Append super to toString method?

Returns:
true if appendSuper should be used

appendSuperToEquals

public boolean appendSuperToEquals()
Append super to equals method?

Returns:
true if appendSuper should be used

appendSuperToCompareTo

public boolean appendSuperToCompareTo()
append super to compareTo method?

Returns:
true if appendSuper should be used

addInstanceCheckToEquals

public boolean addInstanceCheckToEquals()
Add an instance equality check to equals method?

Returns:
true if an instance equality check should be added

useJavabeanToString

public boolean useJavabeanToString()
use javabean properties in toString() instead of fields?

Returns:
true if javabean properties should be used in toString

dontAskOnOverwrite

public boolean dontAskOnOverwrite()
Overwrite existing methods without confirmation?

Returns:
true if methods should be overwritten without confirmation

useFinalParameters

public boolean useFinalParameters()
Use final parameters in generated methods?

Returns:
true if final parameters should be used.

getExcludedFielsPattern

public java.util.regex.Pattern getExcludedFielsPattern()
Returns the list of excluded fields/properties.

Returns:
list of excluded fields/properties

useCustomToStringStyle

public boolean useCustomToStringStyle()
Use a custom toString style?

Returns:
true if a custom ToStringStyle is selected

getToStringStyleQualifiedClass

public java.lang.String getToStringStyleQualifiedClass()
Gets the package.class part of the custom toStringStyle.

Returns:
fully qualified class of the custom toStringStyle

getToStringStyleClassAndConstant

public java.lang.String getToStringStyleClassAndConstant()
Gets the class.CONSTANT part of the custom toStringStyle.

Returns:
class.CONSTANT part from the custom toStringStyle

evaluateExclusionList

protected void evaluateExclusionList()
Gets the CCPlugin.P_EXCLUDE preference from the preference store and generates a Pattern from it.


generateRegExp

public static java.util.regex.Pattern generateRegExp(java.lang.String stringList)
Generate a single regular expression used to match excluded fields.

Parameters:
stringList - list of fileds separate by ";"
Returns:
regular expression that matches all the given Strings


Copyright © 2003-2005 sourceforge. All Rights Reserved.