net.bytebuddy.android.AndroidClassLoadingStrategy Java Examples

The following examples show how to use net.bytebuddy.android.AndroidClassLoadingStrategy. 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: AndroidStageClassCreator.java    From JGiven with Apache License 2.0 4 votes vote down vote up
@Override
protected ClassLoadingStrategy getClassLoadingStrategy(Class<?> stageClass) {
    return new AndroidClassLoadingStrategy.Wrapping(ContextCompat.getCodeCacheDir(InstrumentationRegistry.getTargetContext()));
}
 
Example #2
Source File: AndroidCompatibility.java    From Cubes with MIT License 4 votes vote down vote up
@Override
public Loaded load(Unloaded unloaded) {
  File dir = androidLauncher.getDir("cubes-class", Context.MODE_PRIVATE);
  AndroidClassLoadingStrategy androidClassLoadingStrategy = new AndroidClassLoadingStrategy.Wrapping(dir);
  return unloaded.load(getClass().getClassLoader(), androidClassLoadingStrategy);
}
 
Example #3
Source File: TestActivity.java    From byte-buddy with Apache License 2.0 4 votes vote down vote up
@Override
public AndroidClassLoadingStrategy make(File file) {
    return new AndroidClassLoadingStrategy.Wrapping(file);
}
 
Example #4
Source File: TestActivity.java    From byte-buddy with Apache License 2.0 4 votes vote down vote up
@Override
public AndroidClassLoadingStrategy make(File file) {
    return new AndroidClassLoadingStrategy.Injecting(file);
}
 
Example #5
Source File: TestActivity.java    From byte-buddy with Apache License 2.0 2 votes vote down vote up
/**
 * Creates an Android class loading strategy.
 *
 * @param file The private folder to use.
 * @return The class loading strategy to use.
 */
AndroidClassLoadingStrategy make(File file);