Class XPathFunctionDefinition

java.lang.Object
net.sourceforge.pmd.lang.rule.xpath.impl.XPathFunctionDefinition

public abstract class XPathFunctionDefinition extends Object
Base impl for an XPath function definition.
Since:
7.0.0
  • Constructor Details

    • XPathFunctionDefinition

      protected XPathFunctionDefinition(String localName)
    • XPathFunctionDefinition

      protected XPathFunctionDefinition(String localName, Language language)
  • Method Details

    • getQName

      public final QName getQName()
    • getArgumentTypes

      public XPathFunctionDefinition.Type[] getArgumentTypes()
      Defines the types of the function arguments. By default, an empty array is returned, indicating that the function takes no arguments.
    • getResultType

      public abstract XPathFunctionDefinition.Type getResultType()
      Defines the return type of the function.
    • dependsOnContext

      public boolean dependsOnContext()
      If the function depends on the context item, then this method should return true.

      Note: Only if this is true, the contextNode parameter will be present in the XPathFunctionDefinition.FunctionCall.call(Node, Object[]) method.

    • makeCallExpression

      public abstract XPathFunctionDefinition.FunctionCall makeCallExpression()
      Create a call on this function. This method is called, when a function call is found in the XPath expression.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object