Escaping keywords to use them as identifiers
You can use a keyword as an identifier if you escape it with a hash symbol (#). For example:
package com.company.#monitor.client;
using com.company.#monitor.server.Event;
In a stream query, you can use a query-scope keyword as an identifier if you prefix it with a hash symbol (#). For example:
event Tick
{...
string partition;
...
}
from t in all Tick() partition by t.#partition retain 5 ...
You can define a JMon event type that has a field name that is the same as an EPL keyword. To refer to that field in EPL, prefix it with a hash symbol. For example:
class MyEvent extends Event {
int integer;
...
}
on all MyEvent(#integer = 5): m { ... }
To avoid warning messages if you use a reserved word as an identifier, escape the reserved word with a hash symbol (#).