// 2. check for illegal slots (illegal local variable access)
if(0 > result) {
switch(result) {
case ERROR_CODE_THIS:
throw new IllegalRedefinitionAdviceException("No (implicit) `this' usage allowed in advice method: " + adviceMethod);
case ERROR_CODE_ANY:
throw new IllegalRedefinitionAdviceException("No `ANY' usage allowed in advice method: " + adviceMethod);
case ERROR_CODE_REST:
throw new IllegalRedefinitionAdviceException("No `REST' usage allowed in advice method: " + adviceMethod);
case ERROR_CODE_STATIC_THIS:
throw new IllegalRedefinitionAdviceException("No usage of the first parameter allowed in advice methods that redefine static methods: " + adviceMethod);
default:
throw new IllegalRedefinitionAdviceException("Illegal local variable access (unknown error code: " + result + ") in advice method: " + adviceMethod);
}
}
return result;
}