private static boolean isSystemClass ( String name , List < String > packageList ) { boolean result = false ; if ( packageList != null ) { String canonicalName = ClassLoaderUtil . canonicalizeClassOrResource ( name ) ; for ( String c : packageList ) { boolean shouldInclude = true ; if ( c . startsWith ( "-" ) ) { c = c . substring ( 1 ) ; shouldInclude = false ; } if ( canonicalName . startsWith ( c ) ) { if ( c . endsWith ( "." ) // package || canonicalName . length ( ) == c . length ( ) // class || canonicalName . length ( ) > c . length ( ) // nested && canonicalName . charAt ( c . length ( ) ) == ' ' ) { if ( shouldInclude ) { result = true ; } else { return false ; } } } } } return result ; }
Checks if a class should be included as a system class .