Checks that a local variable or a parameter does not shadow
a field that is defined in the same class.
An example of how to configure the check is:
<module name="HiddenField"/>
An example of how to configure the check so that it checks variables but not
parameters is:
<module name="HiddenField">
<property name="tokens" value="VARIABLE_DEF"/>
</module>
An example of how to configure the check so that it ignores the parameter of
a setter method is:
<module name="HiddenField">
<property name="ignoreSetter" value="true"/>
</module>
An example of how to configure the check so that it ignores constructor
parameters is:
<module name="HiddenField">
<property name="ignoreConstructorParameter" value="true"/>
</module>
getRegexp
public Pattern getRegexp()
- the regexp to match against
setIgnoreAbstractMethods
public void setIgnoreAbstractMethods(boolean aIgnoreAbstractMethods)
Set whether to ignore parameters of abstract methods.
aIgnoreAbstractMethods
- decide whether to ignore
parameters of abstract methods.
setIgnoreConstructorParameter
public void setIgnoreConstructorParameter(boolean aIgnoreConstructorParameter)
Set whether to ignore constructor parameters.
aIgnoreConstructorParameter
- decide whether to ignore
constructor parameters.
setIgnoreFormat
public void setIgnoreFormat(String aFormat)
throws ConversionException
Set the ignore format to the specified regular expression.
setIgnoreSetter
public void setIgnoreSetter(boolean aIgnoreSetter)
Set whether to ignore the parameter of a property setter method.
aIgnoreSetter
- decide whether to ignore the parameter of
a property setter method.