Class XPathFunctionDefinition
java.lang.Object
net.sourceforge.pmd.lang.rule.xpath.impl.XPathFunctionDefinition
Base impl for an XPath function definition.
- Since:
- 7.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceProvides the actual implementation of a custom XPath function.static enumSupported types of a custom XPath function. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedXPathFunctionDefinition(String localName) protectedXPathFunctionDefinition(String localName, Language language) -
Method Summary
Modifier and TypeMethodDescriptionbooleanIf the function depends on the context item, then this method should returntrue.booleanDefines the types of the function arguments.final QNamegetQName()abstract XPathFunctionDefinition.TypeDefines the return type of the function.inthashCode()abstract XPathFunctionDefinition.FunctionCallCreate a call on this function.
-
Constructor Details
-
XPathFunctionDefinition
-
XPathFunctionDefinition
-
-
Method Details
-
getQName
-
getArgumentTypes
Defines the types of the function arguments. By default, an empty array is returned, indicating that the function takes no arguments. -
getResultType
Defines the return type of the function. -
dependsOnContext
public boolean dependsOnContext()If the function depends on the context item, then this method should returntrue.Note: Only if this is true, the contextNode parameter will be present in the
XPathFunctionDefinition.FunctionCall.call(Node, Object[])method. -
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() -
equals
-