jshrink/jshrink-lib/src/main/java/edu/ucla/cs/jshrinklib/util/ClassFileUtils.java
/*
	Note: The following two methods require the jars to be decompressed to function correctly
	(assuming jars are contained within the classpaths).
	*/
The following two methods require the jars to be decompressed to function correctly
(assuming jars are contained within the classpaths).
The following two methods require the jars to be decompressed to function correctly ( assuming jars are contained within the classpaths ) .
public static void removeClass(SootClass sootClass, Collection<File> classPath) throws IOException{
		List<File> filesToReturn = getClassFile(sootClass, classPath);
		if(filesToReturn.isEmpty()){
			throw new IOException("Cannot find file for class '" +  sootClass.getName() + "'");
		}
		for(File f :filesToReturn) {
			FileUtils.forceDelete(f);
		}
		assert(getClassFile(sootClass, classPath).isEmpty());
	}
public static void removeClass ( SootClass sootClass , Collection < File > classPath ) throws IOException { List < File > filesToReturn = getClassFile ( sootClass , classPath ) ; if ( filesToReturn . isEmpty ( ) ) { throw new IOException ( "Cannot find file for class '" + sootClass . getName ( ) + "'" ) ; } for ( File f : filesToReturn ) { FileUtils . forceDelete ( f ) ; } assert ( getClassFile ( sootClass , classPath ) . isEmpty ( ) ) ; }
Note: The following two methods require the jars to be decompressed to function correctly
(assuming jars are contained within the classpaths).
Note : The following two methods require the jars to be decompressed to function correctly ( assuming jars are contained within the classpaths ) .