String getResourceName ( ) { if ( ! resourceNameKnown ) { // The resource name of a classfile can only be determined by // reading // the file and parsing the constant pool. // If we can't do this for some reason, then we just // make the resource name equal to the filename. try { resourceName = getClassDescriptor ( ) . toResourceName ( ) ; } catch ( Exception e ) { resourceName = fileName ; } resourceNameKnown = true ; } return resourceName ; }
Get the resource name of the single file . We have to open the file and parse the constant pool in order to find this out .