Class AbstractApexRule
- java.lang.Object
-
- net.sourceforge.pmd.properties.AbstractPropertySource
-
- net.sourceforge.pmd.lang.rule.AbstractRule
-
- net.sourceforge.pmd.lang.apex.rule.AbstractApexRule
-
- All Implemented Interfaces:
ApexParserVisitor
,ImmutableLanguage
,PropertySource
,CodeClimateRule
,Rule
- Direct Known Subclasses:
AbstractApexUnitTestRule
,AbstractStatisticalApexRule
,ApexBadCryptoRule
,ApexCRUDViolationRule
,ApexCSRFRule
,ApexDangerousMethodsRule
,ApexDocRule
,ApexInsecureEndpointRule
,ApexOpenRedirectRule
,ApexSharingViolationsRule
,ApexSOQLInjectionRule
,ApexSuggestUsingNamedCredRule
,ApexXSSFromEscapeFalseRule
,ApexXSSFromURLParamRule
,AvoidDeeplyNestedIfStmtsRule
,AvoidDmlStatementsInLoopsRule
,AvoidGlobalModifierRule
,AvoidHardcodingIdRule
,AvoidLogicInTriggerRule
,AvoidNonExistentAnnotationsRule
,AvoidSoqlInLoopsRule
,AvoidSoslInLoopsRule
,ClassNamingConventionsRule
,CognitiveComplexityRule
,CyclomaticComplexityRule
,FieldDeclarationsShouldBeAtStartRule
,FieldNamingConventionsRule
,FormalParameterNamingConventionsRule
,InaccessibleAuraEnabledGetterRule
,LocalVariableNamingConventionsRule
,MethodNamingConventionsRule
,MethodWithSameNameAsEnclosingClassRule
,OperationWithLimitsInLoopRule
,OverrideBothEqualsAndHashcodeRule
,PropertyNamingConventionsRule
,StdCyclomaticComplexityRule
,TooManyFieldsRule
,UnusedLocalVariableRule
,VariableNamingConventionsRule
public abstract class AbstractApexRule extends AbstractRule implements ApexParserVisitor, ImmutableLanguage, CodeClimateRule
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.sourceforge.pmd.renderers.CodeClimateRule
CodeClimateRule.CodeClimateCategory
-
-
Field Summary
-
Fields inherited from class net.sourceforge.pmd.properties.AbstractPropertySource
propertyDescriptors, propertyValuesByDescriptor
-
Fields inherited from interface net.sourceforge.pmd.renderers.CodeClimateRule
CODECLIMATE_BLOCK_HIGHLIGHTING, CODECLIMATE_CATEGORIES, CODECLIMATE_REMEDIATION_MULTIPLIER
-
Fields inherited from interface net.sourceforge.pmd.Rule
VIOLATION_SUPPRESS_REGEX_DESCRIPTOR, VIOLATION_SUPPRESS_XPATH_DESCRIPTOR
-
-
Constructor Summary
Constructors Constructor Description AbstractApexRule()
-
Method Summary
-
Methods inherited from class net.sourceforge.pmd.lang.rule.AbstractRule
addExample, addRuleChainVisit, addRuleChainVisit, addViolation, addViolation, addViolation, addViolationWithMessage, addViolationWithMessage, addViolationWithMessage, asCtx, deepCopy, deepCopyValuesTo, end, equals, getDescription, getExamples, getExternalInfoUrl, getLanguage, getMaximumLanguageVersion, getMessage, getMinimumLanguageVersion, getName, 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
-
Methods inherited from interface net.sourceforge.pmd.Rule
addExample, addRuleChainVisit, addRuleChainVisit, deepCopy, end, getDescription, getExamples, getExternalInfoUrl, getLanguage, getMaximumLanguageVersion, getMessage, getMinimumLanguageVersion, getName, getPriority, getRuleChainVisits, getRuleClass, getRuleSetName, getSince, 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
-
-
-
-
Method Detail
-
getParserOptions
public ParserOptions getParserOptions()
- Specified by:
getParserOptions
in interfaceRule
- Overrides:
getParserOptions
in classAbstractRule
-
apply
public void apply(List<? extends Node> nodes, RuleContext ctx)
-
visitAll
protected void visitAll(List<? extends Node> nodes, RuleContext ctx)
-
visit
@Deprecated public Object visit(AbstractApexNodeBase node, Object data)
Deprecated.Usevisit(ApexNode, Object)
. That method also visits comments now.- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ApexNode<?> node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTMethod node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTUserClass node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTModifierNode node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTParameter node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTBlockStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTUserClassMethods node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTBridgeMethodCreator node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTReturnStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTLiteralExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTConstructorPreambleStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTUserInterface node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTUserEnum node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTFieldDeclaration node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTWhileLoopStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTTryCatchFinallyBlockStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTForLoopStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTIfElseBlockStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTIfBlockStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTForEachStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTField node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTBreakStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTThrowStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTDoLoopStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTTernaryExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTSoqlExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTBooleanExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTAnnotation node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTAnonymousClass node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTArrayLoadExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTArrayStoreExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTAssignmentExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTBinaryExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTBindExpressions node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTCatchBlockStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTClassRefExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTContinueStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTDmlDeleteStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTDmlInsertStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTDmlMergeStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTDmlUndeleteStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTDmlUpdateStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTDmlUpsertStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTExpressionStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTFieldDeclarationStatements node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTInstanceOfExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTInvalidDependentCompilation node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTJavaMethodCallExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTJavaVariableExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTMapEntryNode node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTMethodCallExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTModifierOrAnnotation node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTNewListInitExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTNewListLiteralExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTNewMapInitExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTNewMapLiteralExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTNewObjectExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTNewSetInitExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTNewSetLiteralExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTPackageVersionExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTPostfixExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTPrefixExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTProperty node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTReferenceExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTRunAsBlockStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTSoslExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTStandardCondition node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTSuperMethodCallExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTSuperVariableExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTThisMethodCallExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTThisVariableExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTTriggerVariableExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTUserExceptionMethods node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTUserTrigger node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTVariableDeclaration node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTVariableDeclarationStatements node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTVariableExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTAnnotationParameter node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTCastExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTConstructorPreamble node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTIllegalStoreExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTMethodBlockStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTModifier node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTMultiStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTNestedExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTNestedStoreExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTNewKeyValueObjectExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTStatementExecuted node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTFormalComment node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTSwitchStatement node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTElseWhenBlock node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTTypeWhenBlock node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTValueWhenBlock node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTIdentifierCase node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTLiteralCase node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
visit
public Object visit(ASTEmptyReferenceExpression node, Object data)
- Specified by:
visit
in interfaceApexParserVisitor
-
-