Class InstrumentationConfiguration
java.lang.Object
org.robolectric.internal.bytecode.InstrumentationConfiguration
public class InstrumentationConfiguration extends Object
Configuration rules for
SandboxClassLoader
.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InstrumentationConfiguration.Builder
-
Constructor Summary
Constructors Modifier Constructor Description 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 Summary
Modifier and Type Method Description Map<String,String>
classNameTranslations()
Map from a requested class to an alternate stand-in, or not.boolean
equals(Object o)
int
hashCode()
String
mappedTypeName(String internalName)
Set<MethodRef>
methodsToIntercept()
static InstrumentationConfiguration.Builder
newBuilder()
String
remapParams(String desc)
String
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
-