Class UseStringBufferForStringAppendsRule

All Implemented Interfaces:
AstVisitor, JavaVisitor, Rule, PropertySource

public class UseStringBufferForStringAppendsRule extends AbstractJavaRulechainRule
  • Constructor Details

    • UseStringBufferForStringAppendsRule

      public UseStringBufferForStringAppendsRule()
  • Method Details

    • visit

      public Object visit(ASTVariableId node, Object data)
      This method is used to check whether user appends string directly instead of using StringBuffer or StringBuilder
      Parameters:
      node - This is the expression of part of java code to be checked.
      data - This is the data to return.
      Returns:
      Object This returns the data passed in. If violation happens, violation is added to data.