else
{
int nActionCount = getActionCount();
final int nArgOffset = 7; // number of non-vararg arguments
Object[] args = new Object[Math.max(nActionCount, 1) + nArgOffset];
Lookup posMap = new IdentityHashTab(64);
Lookup urlMap = new IdentityHashTab(64);
String sEventURL = getURL(m_metaclass);
String sURLPrefix = sEventURL + "$";
// When updating the event generator invocation code,
// also update the plugin action compilation validation
args[0] = this;
args[1] = getArguments(true);
args[2] = getVariables();
args[3] = getPrivilege();
if (m_accessAttribute == null)
{
args[4] = null;
}
else if (m_bStatic)
{
if (m_accessAttribute.isStatic())
{
args[4] = Primitive.createInteger(m_accessAttribute.getOrdinal());
}
else
{
args[4] = null;
}
}
else
{
args[4] = Primitive.createInteger(
(m_accessAttribute.isStatic()) ?
-1 -m_accessAttribute.getOrdinal() :
m_accessAttribute.getOrdinal());
}
args[5] = Boolean.valueOf(getArgumentCount() == 0 && "delete".equals(m_sName));
byte nTransactionMode = ((getSymbol() == Symbol.CREATE || getSymbol() == Symbol.UPDATE) &&
getArgumentCount() == 0) ? TX_SUPPORTED : getTransactionMode();
args[6] = Primitive.createInteger(nTransactionMode);
m_bTransient = (nTransactionMode != TX_SUPPORTED);
for (int i = 0; i < nActionCount; ++i)
{
Action action = getAction(i);
Object condition = action.getCondition();
String sURL;
Object body;
if (action.getDeclarator() != null)
{
sURL = getURL(action.getDeclarator()) + "$" + action.getFullName();
}
else
{
sURL = sURLPrefix + action.getFullName();
}
if (action.getMethod() == null)
{
body = action.getBody();
if (body == null)
{
body = EMPTY_BODY;
}
}
else
{
body = Pair.list(Pair.list(Pair.quote(new JavaAction(action)),
(action.getType() == Action.AROUND) ? Symbol.CALL_NEXT : EMPTY_CLOSURE));
}
Lookup map = action.getTextPositionMap();
if (map != null)
{
for (Lookup.Iterator itr = map.iterator(); itr.hasNext();)
{
itr.next();
posMap.put(itr.getKey(), itr.getValue());
urlMap.put(itr.getValue(), sURL);
}