Class QueueableWithoutFinalizerRule

  • All Implemented Interfaces:
    net.sourceforge.pmd.lang.apex.ast.ApexVisitor , net.sourceforge.pmd.lang.ast.AstVisitor , net.sourceforge.pmd.lang.rule.Rule , net.sourceforge.pmd.properties.PropertySource

    
    public class QueueableWithoutFinalizerRule
    extends AbstractApexRule
                        

    Scans classes which implement the `Queueable` interface. If the `public void execute(QueueableContext context)` method does not call the `System.attachFinalizer(Finalizer f)` method, then a violation will be added to the `execute` method.

    Author:

    mitchspano

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Object visit(ASTUserClass theClass, Object data) If the class implements the `Queueable` interface and the `execute(QueueableContext context)` does not call the `System.attachFinalizer(Finalizer f)` method, then add a violation.
      • Methods inherited from class net.sourceforge.pmd.lang.rule.AbstractRule

        addExample, deepCopy, end, equals, getDescription, getExamples, getExternalInfoUrl, getLanguage, getMaximumLanguageVersion, getMessage, getMinimumLanguageVersion, getName, getPriority, getRuleClass, getRuleSetName, getSince, getTargetSelector, hashCode, isDeprecated, setDeprecated, setDescription, setExternalInfoUrl, setLanguage, setMaximumLanguageVersion, setMessage, setMinimumLanguageVersion, setName, setPriority, setRuleClass, setRuleSetName, setSince, start
      • Methods inherited from class net.sourceforge.pmd.properties.AbstractPropertySource

        definePropertyDescriptor, getOverriddenPropertiesByPropertyDescriptor, getOverriddenPropertyDescriptors, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, isPropertyOverridden, setProperty
      • Methods inherited from class net.sourceforge.pmd.lang.apex.rule.AbstractApexRule

        apply, visitNode
      • Methods inherited from class net.sourceforge.pmd.lang.apex.ast.ApexVisitor

        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, visitApexNode
      • Methods inherited from class net.sourceforge.pmd.lang.rule.Rule

        apply, initialize
      • Methods inherited from class net.sourceforge.pmd.properties.PropertySource

        dysfunctionReason
      • Methods inherited from class net.sourceforge.pmd.lang.ast.AstVisitor

        cannotVisit, visitNode
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QueueableWithoutFinalizerRule

        QueueableWithoutFinalizerRule()
    • Method Detail

      • visit

         Object visit(ASTUserClass theClass, Object data)

        If the class implements the `Queueable` interface and the `execute(QueueableContext context)` does not call the `System.attachFinalizer(Finalizer f)` method, then add a violation.