Java Code Examples for org.apache.bcel.Repository#setRepository()

The following examples show how to use org.apache.bcel.Repository#setRepository() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AllocationInstrumenterVerifier.java    From allocation-instrumenter with Apache License 2.0 5 votes vote down vote up
/**
 * Given a list of fully-qualified (dotted) classnames, instrument each using the
 * AllocationInstrumenter and verify each with BCEL's JustIce verifier.
 */
public static final void main(String[] args) {
  InstrumentingClassLoader loader =
      new InstrumentingClassLoader(
          AllocationInstrumenterVerifier.class.getName().replace('.', '/'),
          "dummyRecorder",
          AllocationInstrumenterVerifier.class.getClassLoader());
  Repository.setRepository(new ClassLoaderRepository(loader));
  Verifier.main(args);
}
 
Example 2
Source File: AnalysisContext.java    From spotbugs with GNU Lesser General Public License v2.1 4 votes vote down vote up
/**
 * Clear the BCEL Repository in preparation for analysis.
 */
public void clearRepository() {
    // Set the backing store for the BCEL Repository to
    // be the AnalysisCache.
    Repository.setRepository(new AnalysisCacheToRepositoryAdapter());
}
 
Example 3
Source File: ClassFileSetCheck.java    From cacheonix-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
/**
 * Stores the class loader and makes it the Repository's class loader.
 * @param aClassLoader class loader to resolve classes with.
 */
public void setClassLoader(ClassLoader aClassLoader)
{
    Repository.setRepository(new ClassLoaderRepository(aClassLoader));
    mClassLoader = aClassLoader;
}
 
Example 4
Source File: ClassFileSetCheck.java    From contribution with GNU Lesser General Public License v2.1 4 votes vote down vote up
/**
 * Stores the class loader and makes it the Repository's class loader.
 * @param aClassLoader class loader to resolve classes with.
 */
public void setClassLoader(ClassLoader aClassLoader)
{
    Repository.setRepository(new ClassLoaderRepository(aClassLoader));
    mClassLoader = aClassLoader;
}