handleJitCompilation(
methodHash, joinPointType, PointcutType.EXECUTION, joinPointInfo, m_targetClass, m_targetClass
);
}
JoinPoint joinPoint = joinPointInfo.joinPoint;
// if null or redefined -> create a new join point and cache it
if (joinPoint == null) {
Map pointcutTypeToAdvicesMap = s_registry.getAdvicesForJoinPoint(m_classHash, methodHash);
AdviceContainer[] adviceIndexes = null;
switch (joinPointType) {
case JoinPointType.METHOD_EXECUTION:
adviceIndexes = (AdviceContainer[])pointcutTypeToAdvicesMap.get(PointcutType.EXECUTION);
joinPoint = createMethodJoinPoint(methodHash, joinPointType, m_targetClass, adviceIndexes);
break;
case JoinPointType.CONSTRUCTOR_EXECUTION:
adviceIndexes = (AdviceContainer[])pointcutTypeToAdvicesMap.get(PointcutType.EXECUTION);
joinPoint = createConstructorJoinPoint(methodHash, joinPointType, m_targetClass, adviceIndexes);
break;
default:
throw new RuntimeException("join point type not valid");
}
// set the join point
joinPointInfo.joinPoint = joinPoint;
// update the state
if (adviceIndexes.length == 0) {
joinPointInfo.state = JoinPointState.ADVISED;
}
else {
joinPointInfo.state = JoinPointState.HAS_ADVICES;
}
}
// set the RTTI
((JoinPointBase)joinPoint).setTargetInstance(targetInstance);
if (parameters != null) {
((CodeSignature)joinPoint.getSignature()).setParameterValues(parameters);
}
return ((JoinPointBase)joinPoint).proceed();
}