use of org.springsource.loaded.CurrentLiveVersion in project spring-loaded by spring-projects.
the class ReflectiveInterceptor method jlrMethodGetParameterAnnotations.
public static Annotation[][] jlrMethodGetParameterAnnotations(Method method) {
ReloadableType rtype = getReloadableTypeIfHasBeenReloaded(method.getDeclaringClass());
if (rtype == null) {
//Nothing special to be done
return method.getParameterAnnotations();
} else {
// Method could have changed...
CurrentLiveVersion clv = rtype.getLiveVersion();
MethodMember currentMethod = rtype.getCurrentMethod(method.getName(), Type.getMethodDescriptor(method));
Method executor = clv.getExecutorMethod(currentMethod);
Annotation[][] result = executor.getParameterAnnotations();
if (!currentMethod.isStatic()) {
//Non=static methods have an extra param.
//Though extra param is added to front...
//Annotations aren't being moved so we have to actually drop the *last* array element
result = Utils.arrayCopyOf(result, result.length - 1);
}
return result;
}
}
Aggregations