question: String [ ] qualify ( String cppName ) { if ( cppName == null || cppName . length ( ) == 0 ) { return new String [ 0 ] ; } ArrayList < String > names = new ArrayList < String > ( ) ; String ns = namespace != null ? namespace : "" ; while ( ns != null ) { String name = ns . length ( ) > 0 ? ns + "::" + cppName : cppName ; TemplateMap map = templateMap ; while ( map != null ) { if ( name . equals ( map . getName ( ) ) ) { String args = "<" , separator = "" ; for ( String s : map . values ( ) ) { args += separator + s ; separator = "," ; } names . add ( name + args + ( args . endsWith ( ">" ) ? " >" : ">" ) ) ; break ; } map = map . parent ; } names . add ( name ) ; ns = InfoMap . normalize ( ns , false , true ) ; int i = ns . lastIndexOf ( "::" ) ; ns = i >= 0 ? ns . substring ( 0 , i ) : ns . length ( ) > 0 ? "" : null ; } for ( String s : usingList ) { String prefix = InfoMap . normalize ( cppName , false , true ) ; int i = s . lastIndexOf ( "::" ) + 2 ; ns = s . substring ( 0 , i ) ; String suffix = s . substring ( i ) ; if ( suffix . length ( ) == 0 || prefix . equals ( suffix ) ) { names . add ( ns + cppName ) ; } } return names . toArray ( new String [ names . size ( ) ] ) ; }
target:  Return all likely combinations of namespaces and template arguments for this C++ type 