* @return The interceptor manager, or null if the instance is not an interceptor generated by this API/framework
*
* @see InterceptorCompiler
*/
public static IInterceptorManager getManager (Object instance) {
ClassField field = ClassCache.getFor(instance.getClass()).getField(InterceptorProxyTypeInterceptor.INTERCEPTOR_FIELD_NAME);
if (field != null && field.getFieldType() == IInterceptorManager.class) {
field.ensureAccessibility();
return (IInterceptorManager) field.getValue(instance);
}
return null;
}