[Soot-list] loading class files with Soot in abc

Patrick LAM plam at sable.mcgill.ca
Sun Feb 5 14:44:43 EST 2006


On Sun, 5 Feb 2006, Oege de Moor wrote:

>              List/*String*/ this_jar_classes =
>                 soot.SourceLocator.v().getClassesUnder(jar);
>
> Unfortunately, the call to getClassesUnder(..) picks up not
> only *.class files, but also *.java and *.jimple, which we
> do not want: it should pick up *.class and nothing else.

Soot's SourceLocator tells it what types of files it should read.  If
abc is only supposed to read .class files, then you need
soot.SourceLocator.setupClassProviders to handle another case, i.e.

	case Options.src_only_class:
		classProviders.add(new CoffiClassProvider());
		break;

and abc should, in its initialization phase, add Options.v().src_prec
return Options.src_only_class.

Ondrej and Jennifer are trying to make a release this weekend, so I'm not
going to commit this change without coordinating with them, but it should
be a trivial change.

pat




More information about the Soot-list mailing list