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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceXPathFunctionDefinition.FunctionCallProvides the actual implementation of a custom XPath function.static classXPathFunctionDefinition.TypeSupported types of a custom XPath function.
-
Constructor Summary
Constructors Modifier Constructor Description protectedXPathFunctionDefinition(String localName)protectedXPathFunctionDefinition(String localName, Language language)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleandependsOnContext()If the function depends on the context item, then this method should returntrue.booleanequals(Object o)XPathFunctionDefinition.Type[]getArgumentTypes()Defines the types of the function arguments.QNamegetQName()abstract XPathFunctionDefinition.TypegetResultType()Defines the return type of the function.inthashCode()abstract XPathFunctionDefinition.FunctionCallmakeCallExpression()Create a call on this function.
-
-
-
Method Detail
-
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 returntrue.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.
-
-