Class LocationReferenceCheck

    • Constructor Detail

      • LocationReferenceCheck

        public LocationReferenceCheck()
    • Method Detail

      • isRelevantCall

        protected boolean isRelevantCall​(@Nullable
                                         String pQualifier,
                                         @Nonnull
                                         String pMethodName)
        Description copied from class: AbstractMethodCallCheck
        Filter method which determines if the given method call is considered relevant.
        Specified by:
        isRelevantCall in class AbstractMethodCallCheck
        Parameters:
        pQualifier - the qualifier of the method call (for a call like Foo.Bar.call(), the qualifier is Foo.Bar)
        pMethodName - the simple name of the called method
        Returns:
        indication of whether the call is relevant (true) or not (false)
      • visitMethodCall

        protected void visitMethodCall​(@Nonnull
                                       String pMethodName,
                                       @Nonnull
                                       DetailAST pMethodCallAst)
        Description copied from class: AbstractMethodCallCheck
        Visitor method called when a relevant method call is encountered. This method is called in addition to the other visitor methods.
        Specified by:
        visitMethodCall in class AbstractMethodCallCheck
        Parameters:
        pMethodName - the simple name of the called method
        pMethodCallAst - AST of the call, useful for logging issues ( this is a METHOD_DEF, CTOR_CALL, or a SUPER_CTOR_CALL token)
      • setMethodCalls

        public void setMethodCalls​(String... pMethodCalls)
        Setter.
        Parameters:
        pMethodCalls - list of qualified method calls to cover
      • setVariableNames

        public void setVariableNames​(String... pVariableNames)
        Setter.
        Parameters:
        pVariableNames - list of variable names to cover
      • setLocation

        public void setLocation​(String pLocation)
      • setArgumentPosition

        public void setArgumentPosition​(int pArgumentPosition)