Class AbstractInefficientZeroCheck

    • Constructor Detail

      • AbstractInefficientZeroCheck

        public AbstractInefficientZeroCheck()
    • Method Detail

      • appliesToClassName

        public abstract boolean appliesToClassName​(String name)
      • getComparisonTargets

        public Map<String,​List<String>> getComparisonTargets()
        For each relation/equality operator, comparison targets need to define.
        Returns:
        map
      • checkNodeAndReport

        protected void checkNodeAndReport​(Object data,
                                          Node location,
                                          Node expr)
        Checks whether the given expression is a equality/relation expression that compares with a size() call.
        Parameters:
        data - the rule context
        location - the node location to report
        expr - the ==, <, > expression