if (clazz != null)
{
if (m_nVisibility != PUBLIC)
{
throw new SecurityViolationException("err.rpc.classVisibility", new Object[]{clazz.getName()});
}
pair = (Pair)expr;
if (pair.getHead() instanceof Pair)
{
int nArgCount = 0;
Object next;
for (next = pair.getTail(); next instanceof Pair; next = ((Pair)next).getTail())
{
++nArgCount;
}
if (next == null)
{
pair = (Pair)pair.getHead();
if (pair.getHead() == Symbol.QUOTE && pair.getTail() instanceof Pair)
{
pair = pair.getNext();
if (pair.getHead() instanceof Symbol && pair.getTail() == null)
{
Member member = clazz.getSelector(pair.getHead().toString()).getMember(nArgCount);
if (!member.isStatic())
{
throw new ScriptingException(
(member.isAttribute()) ?
"err.scripting.staticAttribute" :
"err.scripting.staticEvent",
new Object[]{member.getName(), clazz.getName()});
}
if (member.isAttribute())
{
if (nArgCount == 0)
{
((Attribute)member).checkReadAccess(privilegeSet);
}
else
{
((Attribute)member).checkUpdateAccess(privilegeSet);
}
}
else
{
((Event)member).checkAccess(privilegeSet);
}
expr = ((Pair)expr).getTail();
head = null;
}
}
}
}
}
}
if (head != null && !m_metadata.isPublicSymbol((Symbol)head))
{
throw new SecurityViolationException("err.rpc.functionVisibility",
new Object[]{head});
}
}
else if (head instanceof Pair)
{
throw new SecurityViolationException("err.rpc.expressionVisibility",
new Object[]{head});
}
for (; expr instanceof Pair; expr = pair.getTail())
{