void (ClassRepr repr, Collection<String> classImports, Collection<String> staticImports) { for (final String anImport : classImports) { if (!anImport.endsWith(IMPORT_WILDCARD_SUFFIX)) { repr.addUsage(UsageRepr.createClassUsage(myContext, myContext.get(anImport.replace('.', '/')))); } } for (String anImport : staticImports) { if (anImport.endsWith(IMPORT_WILDCARD_SUFFIX)) { final int iname = myContext.get(anImport.substring(0, anImport.length() - IMPORT_WILDCARD_SUFFIX.length()).replace('.', '/')); repr.addUsage(UsageRepr.createClassUsage(myContext, iname)); repr.addUsage(UsageRepr.createImportStaticOnDemandUsage(myContext, iname)); } else { final int i = anImport.lastIndexOf('.'); if (i > 0 && i < anImport.length() - 1) { final int iname = myContext.get(anImport.substring(0, i).replace('.', '/')); final int memberName = myContext.get(anImport.substring(i+1)); repr.addUsage(UsageRepr.createClassUsage(myContext, iname)); repr.addUsage(UsageRepr.createImportStaticMemberUsage(myContext, memberName, iname)); } } } }