You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Biestro (Jira)" <ji...@apache.org> on 2024/05/24 13:51:00 UTC
[jira] [Updated] (JEXL-423) Add support for instanceof / !instanceof
[ https://issues.apache.org/jira/browse/JEXL-423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Biestro updated JEXL-423:
-------------------------------
Description:
The {code:java} instanceof {code}
operator allows to check whether an object belongs to a certain class.
It is using Class.isInstance to perform the check. As a convenience, {{ !instanceof }} is supported as well avoiding parenthesis as in:
{code:java}x !instanceof y{code} is equivalent to {code:java} !(x instanceof y){code}
was:
The {{instanceof}} operator allows to check whether an object belongs to a certain class.
It is using Class.isInstance to perform the check. As a convenience, {{!instanceof}} is supported as well avoiding parenthesis as in:
{{x !instanceof y}} is equivalent to {{!(x instanceof y)}}
> Add support for instanceof / !instanceof
> ----------------------------------------
>
> Key: JEXL-423
> URL: https://issues.apache.org/jira/browse/JEXL-423
> Project: Commons JEXL
> Issue Type: New Feature
> Affects Versions: 3.3
> Reporter: Henri Biestro
> Assignee: Henri Biestro
> Priority: Minor
> Fix For: 3.3.1
>
>
> The {code:java} instanceof {code}
> operator allows to check whether an object belongs to a certain class.
> It is using Class.isInstance to perform the check. As a convenience, {{ !instanceof }} is supported as well avoiding parenthesis as in:
> {code:java}x !instanceof y{code} is equivalent to {code:java} !(x instanceof y){code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)