Note that there are some explanatory texts on larger screens.

plurals
  1. POsymbol not found: static method in abstract class (BCEL)
    primarykey
    data
    text
    <p>I'm a bit stuck on this. I can't compile because java claims not to find the method <code>setRepository()</code>, which is defined for the abstract class <code>Repository</code> in the follow code:</p> <pre><code> public abstract class Repository { private static org.apache.bcel.util.Repository _repository = SyntheticRepository.getInstance(); /** Set repository instance to be used for class loading */ public static void setRepository( org.apache.bcel.util.Repository rep ) { _repository = rep; } /** Clear the repository. */ public static void clearCache() { _repository.clear(); } } </code></pre> <p>Note that the clearCache function links just fine...</p> <p>Here's the code that attempt to use this function</p> <pre><code> public static void run(List&lt;String&gt; allClasses) { Config config = Config.g(); ClassPath classpath = new ClassPath(config.outJar + File.pathSeparator + config.libJars); SyntheticRepository repo = SyntheticRepository.getInstance(classpath); org.apache.bcel.Repository.clearCache(); org.apache.bcel.Repository.setRepository((org.apache.bcel.util.Repository)repo); </code></pre> <p>Note that there's an annoying complication that in BCEL there is both an abstract class Repository, and an interface Repository (org.apache.bcel.util.Repository). I don't know if this is related to the issue.</p> <p>Complete error output:</p> <pre><code>[javac] Compiling 1 source file to /Users/gestalt/code/stamp/droidrecord/droidrecord/instrumentor/classes [javac] /Users/gestalt/code/stamp/droidrecord/droidrecord/instrumentor/src/edu/stanford/droidrecord/instrumentor/util/OutputVerifier.java:31: cannot find symbol [javac] symbol : method setRepository(org.apache.bcel.util.Repository) [javac] location: class org.apache.bcel.Repository [javac] org.apache.bcel.Repository.setRepository(repo); [javac] ^ [javac] 1 error </code></pre> <p>Thank folks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload