Class AccessorClassGenerationRule
- java.lang.Object
-
- net.sourceforge.pmd.properties.AbstractPropertySource
-
- net.sourceforge.pmd.lang.rule.AbstractRule
-
- net.sourceforge.pmd.lang.java.rule.AbstractJavaRule
-
- net.sourceforge.pmd.lang.java.rule.bestpractices.AccessorClassGenerationRule
-
- All Implemented Interfaces:
JavaParserVisitor
,net.sourceforge.pmd.lang.rule.ImmutableLanguage
,net.sourceforge.pmd.properties.PropertySource
,net.sourceforge.pmd.Rule
public class AccessorClassGenerationRule extends AbstractJavaRule
1. Note all private constructors. 2. Note all instantiations from outside of the class by way of the private constructor. 3. Flag instantiations.Parameter types can not be matched because they can come as exposed members of classes. In this case we have no way to know what the type is. We can make a best effort though which can filter some?
- Author:
- CL Gilbert ([email protected]), David Konecny (david.konecny@), Romain PELISSE, [email protected], patch bug#1807370, Juan Martin Sotuyo Dodero ([email protected]), complete rewrite
-
-
Constructor Summary
Constructors Constructor Description AccessorClassGenerationRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
end(net.sourceforge.pmd.RuleContext ctx)
java.lang.Object
visit(ASTAllocationExpression node, java.lang.Object data)
java.lang.Object
visit(ASTConstructorDeclaration node, java.lang.Object data)
-
Methods inherited from class net.sourceforge.pmd.lang.java.rule.AbstractJavaRule
apply, getDeclaringType, importsPackage, isQualifiedName, isSuppressed, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitAll
-
Methods inherited from class net.sourceforge.pmd.lang.rule.AbstractRule
addExample, addRuleChainVisit, addRuleChainVisit, addViolation, addViolation, addViolation, addViolationWithMessage, addViolationWithMessage, addViolationWithMessage, deepCopy, deepCopyValuesTo, equals, getDescription, getExamples, getExternalInfoUrl, getLanguage, getMaximumLanguageVersion, getMessage, getMinimumLanguageVersion, getName, getParserOptions, getPriority, getPropertySourceType, getRuleChainVisits, getRuleClass, getRuleSetName, getSince, hashCode, isDeprecated, isDfa, isMultifile, isRuleChain, isTypeResolution, setDeprecated, setDescription, setDfa, setExternalInfoUrl, setLanguage, setMaximumLanguageVersion, setMessage, setMinimumLanguageVersion, setMultifile, setName, setPriority, setRuleClass, setRuleSetName, setSince, setTypeResolution, setUsesDFA, setUsesMultifile, setUsesTypeResolution, start, usesDFA, usesMultifile, usesRuleChain, usesTypeResolution
-
Methods inherited from class net.sourceforge.pmd.properties.AbstractPropertySource
copyPropertyDescriptors, copyPropertyValues, definePropertyDescriptor, dysfunctionReason, getOverriddenPropertiesByPropertyDescriptor, getOverriddenPropertyDescriptors, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, isPropertyOverridden, setProperty, setProperty, useDefaultValueFor, usesDefaultValues
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sourceforge.pmd.properties.PropertySource
definePropertyDescriptor, dysfunctionReason, getOverriddenPropertiesByPropertyDescriptor, getOverriddenPropertyDescriptors, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, isPropertyOverridden, setProperty, setProperty, useDefaultValueFor, usesDefaultValues
-
-
-
-
Method Detail
-
end
public void end(net.sourceforge.pmd.RuleContext ctx)
- Specified by:
end
in interfacenet.sourceforge.pmd.Rule
- Overrides:
end
in classnet.sourceforge.pmd.lang.rule.AbstractRule
-
visit
public java.lang.Object visit(ASTConstructorDeclaration node, java.lang.Object data)
- Specified by:
visit
in interfaceJavaParserVisitor
- Overrides:
visit
in classAbstractJavaRule
-
visit
public java.lang.Object visit(ASTAllocationExpression node, java.lang.Object data)
- Specified by:
visit
in interfaceJavaParserVisitor
- Overrides:
visit
in classAbstractJavaRule
-
-