String nameFromRefType(String refType) {
        Matcher matcher = refTypePattern.matcher(refType);
        if (matcher.matches()) {
            return matcher.group(1);
        } else if (refType.startsWith("[")) {
            return null;
        } else {
            return refType;
        }
    }
String nameFromRefType ( String refType ) { Matcher matcher = refTypePattern . matcher ( refType ) ; if ( matcher . matches ( ) ) { return matcher . group ( 1 ) ; } else if ( refType . startsWith ( "[" ) ) { return null ; } else { return refType ; } }
Given a ref type name, extracts and returns the class name from it, if any.
Ref type names are obtained from a Class_info structure (JVMS 4.4.1) and from
Fieldref_info, Methodref_info, and InterfaceMethodref_info structures (JVMS 4.4.2).
They represent named classes or array classes mentioned by name, and they
represent class or interface types that have the referenced field or method
as a member. They have one of the following forms:

[I       // array of primitives, including multi-dimensional
name     // the named class
[Lname;  // array whose component is the named class (also multi-d)

Notably, a plain class name doesn't have the L prefix and ; suffix, and
primitives and void do not occur.

Returns nullable reference instead of Optional because downstream
processing can throw checked exceptions.

@param refType a reference type name
@return the extracted class name, or null