{
/*
* check the cache
*/
IntrospectionCacheData icd = context.icacheGet( this );
Class c = o.getClass();
/*
* like ASTIdentifier, if we have cache information, and the
* Class of Object o is the same as that in the cache, we are
* safe.
*/
if ( icd != null && icd.contextData == c )
{
/*
* sadly, we do need recalc the values of the args, as this can
* change from visit to visit
*/
for (int j = 0; j < paramCount; j++)
params[j] = jjtGetChild(j + 1).value(context);
/*
* and get the method from the cache
*/
method = (VelMethod) icd.thingy;
}
else
{
/*
* otherwise, do the introspection, and then
* cache it
*/
for (int j = 0; j < paramCount; j++)
params[j] = jjtGetChild(j + 1).value(context);
method = rsvc.getUberspect().getMethod(o, methodName, params, new Info("",1,1));
if (method != null)
{
icd = new IntrospectionCacheData();
icd.contextData = c;
icd.thingy = method;
context.icachePut( this, icd );
}
}