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 2020/06/11 18:05:00 UTC
[jira] [Created] (JEXL-333) Allow declaration of namespace within
script
Henri Biestro created JEXL-333:
----------------------------------
Summary: Allow declaration of namespace within script
Key: JEXL-333
URL: https://issues.apache.org/jira/browse/JEXL-333
Project: Commons JEXL
Issue Type: Improvement
Affects Versions: 3.1
Reporter: Henri Biestro
Assignee: Henri Biestro
Fix For: 3.2
WHAT:
Allow declaration of a namespace within a script.
WHY:
As of 3.1, namespaces must be declared at Jexl engine building time. With an external (properties) configuration, adding new namespaces requires rebuilding the engine or updating the namespace map. This is often inconvenient in test or dev scenarios.
HOW:
Using a pragma, it is possible to statically add namespace entries for valid for the duration of the script execution. The options vehicle can be reused.
The syntax will be:
{code}#pragma jexl.namespace.xyz f.q.c.n{code}
Where xyz is the actual namespace prefix and 'f.q.c.n.' the fully qualified class name.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)