Class InstrumentationConfiguration
java.lang.Object
org.robolectric.internal.bytecode.InstrumentationConfiguration
Configuration rules for
SandboxClassLoader.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInstrumentationConfiguration(Map<String, String> classNameTranslations, Collection<MethodRef> interceptedMethods, Collection<String> instrumentedPackages, Collection<String> instrumentedClasses, Collection<String> classesToNotAcquire, Collection<String> packagesToNotAquire, Collection<String> classesToNotInstrument, Collection<String> packagesToNotInstrument, String classesToNotInstrumentRegex) -
Method Summary
Modifier and TypeMethodDescriptionMap from a requested class to an alternate stand-in, or not.booleaninthashCode()mappedTypeName(String internalName) remapParams(String desc) remapParamType(String desc) booleanshouldAcquire(String name) Determine ifSandboxClassLoadershould load a given class.booleanshouldAcquireResource(String name) Determine ifSandboxClassLoadershould load a given resource.booleanshouldInstrument(ClassDetails classDetails) Determine ifSandboxClassLoadershould instrument a given class.
-
Constructor Details
-
InstrumentationConfiguration
protected InstrumentationConfiguration(Map<String, String> classNameTranslations, Collection<MethodRef> interceptedMethods, Collection<String> instrumentedPackages, Collection<String> instrumentedClasses, Collection<String> classesToNotAcquire, Collection<String> packagesToNotAquire, Collection<String> classesToNotInstrument, Collection<String> packagesToNotInstrument, String classesToNotInstrumentRegex)
-
-
Method Details
-
newBuilder
-
shouldInstrument
Determine ifSandboxClassLoadershould instrument a given class.- Parameters:
classDetails- The class to check.- Returns:
- True if the class should be instrumented.
-
shouldAcquire
Determine ifSandboxClassLoadershould load a given class.- Parameters:
name- The fully-qualified class name.- Returns:
- True if the class should be loaded.
-
shouldAcquireResource
Determine ifSandboxClassLoadershould load a given resource.- Parameters:
name- The fully-qualified resource name.- Returns:
- True if the resource should be loaded.
-
methodsToIntercept
-
classNameTranslations
Map from a requested class to an alternate stand-in, or not.- Returns:
- Mapping of class name translations.
-
equals
-
hashCode
public int hashCode() -
remapParamType
-
remapParams
-
mappedTypeName
-