public static String getNonAnonymousPortion(String className) {
        String[] components = CLASS_COMPONENT_DELIMITER.split(className);
        StringBuilder buffer = new StringBuilder(className.length()).append(components[0]);
        for (int i = 1; (i < components.length) && !ANONYMOUS_COMPONENT.matcher(components[i]).matches(); i++) {
            buffer.append(Values.INNER_CLASS_SEPARATOR).append(components[i]);
        }
        return buffer.toString();
    }
public static String getNonAnonymousPortion ( String className ) { String [ ] components = CLASS_COMPONENT_DELIMITER . split ( className ) ; StringBuilder buffer = new StringBuilder ( className . length ( ) ) . append ( components [ 0 ] ) ; for ( int i = 1 ; ( i < components . length ) && ! ANONYMOUS_COMPONENT . matcher ( components [ i ] ) . matches ( ) ; i ++ ) { buffer . append ( Values . INNER_CLASS_SEPARATOR ) . append ( components [ i ] ) ; } return buffer . toString ( ) ; }
@param className
the name of the class

@return the class name, discarding any anonymous component