Class InstrumentationConfiguration
java.lang.Object
org.robolectric.internal.bytecode.InstrumentationConfiguration
Configuration rules for
SandboxClassLoader
.-
Nested Class Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
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 Summary
Modifier and TypeMethodDescriptionMap from a requested class to an alternate stand-in, or not.boolean
int
hashCode()
mappedTypeName
(String internalName) remapParams
(String desc) remapParamType
(String desc) boolean
shouldAcquire
(String name) Determine ifSandboxClassLoader
should load a given class.boolean
shouldAcquireResource
(String name) Determine ifSandboxClassLoader
should load a given resource.boolean
shouldInstrument
(ClassDetails classDetails) Determine ifSandboxClassLoader
should 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 ifSandboxClassLoader
should instrument a given class.- Parameters:
classDetails
- The class to check.- Returns:
- True if the class should be instrumented.
-
shouldAcquire
Determine ifSandboxClassLoader
should load a given class.- Parameters:
name
- The fully-qualified class name.- Returns:
- True if the class should be loaded.
-
shouldAcquireResource
Determine ifSandboxClassLoader
should 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
-