protected static boolean isCglibGetCallbacks(AnnotatedMethod am){
  Class<?> rt=am.getRawType();
  if (rt == null || !rt.isArray()) {
    return false;
  }
  Class<?> compType=rt.getComponentType();
  Package pkg=compType.getPackage();
  if (pkg != null) {
    String pname=pkg.getName();
    if (pname.startsWith("net.sf.cglib") || pname.startsWith("org.hibernate.repackage.cglib")) {
      return true;
    }
  }
  return false;
}

protected static boolean isCglibGetCallbacks ( AnnotatedMethod am ) { Class < ? > rt = am . getRawType ( ) ; if ( rt == null || ! rt . isArray ( ) ) { return false ; } Class < ? > compType = rt . getComponentType ( ) ; Package pkg = compType . getPackage ( ) ; if ( pkg != null ) { String pname = pkg . getName ( ) ; if ( pname . startsWith ( "net.sf.cglib" ) || pname . startsWith ( "org.hibernate.repackage.cglib" ) ) { return true ; } } return false ; }
this method was added to address [ jackson - 53 ] : need to weed out cglib - injected " getcallbacks " . at this point caller has detected a potential getter method with name " getcallbacks " and we need to determine if it is indeed injectect by cglib . we do this by verifying that the result type is " net . sf . cglib . proxy . callback [ ] " < p > also , see [ jackson - 177 ] ; hibernate may repackage cglib it uses , so we better catch that too
