-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[java] Simplify xpath typeof syntax #1115
Copy link
Copy link
Closed
Labels
in:documentationAffects the documentation [doc]Affects the documentation [doc]in:type-resolutionAffects the type resolution codeAffects the type resolution codein:xpathRelating to xpath support at large, eg Jaxen / Saxon, custom functions, attribute resolutionRelating to xpath support at large, eg Jaxen / Saxon, custom functions, attribute resolution
Milestone
Metadata
Metadata
Assignees
Labels
in:documentationAffects the documentation [doc]Affects the documentation [doc]in:type-resolutionAffects the type resolution codeAffects the type resolution codein:xpathRelating to xpath support at large, eg Jaxen / Saxon, custom functions, attribute resolutionRelating to xpath support at large, eg Jaxen / Saxon, custom functions, attribute resolution
Type
Fields
Give feedbackNo fields configured for issues without a type.
The
typeoffunction currently uses three arguments that appear to be quite redundant (and are not documented other than a single example). The documentation is outdated too, mentioning that only ClassOrInterfaceType is supportedWhat I gather is
@Image-> this could be inferred from the context node, just like the metric function is called with simplymetric('NCSS').I think we could create a new function (for compatibility), e.g.
typeIs(this name seems clearer anyway since it returns a boolean), that you could call like: