Class InstrumentationConfiguration

java.lang.Object
org.robolectric.internal.bytecode.InstrumentationConfiguration

public class InstrumentationConfiguration extends Object
Configuration rules for SandboxClassLoader.
  • Constructor Details

  • Method Details

    • newBuilder

      public static InstrumentationConfiguration.Builder newBuilder()
    • shouldInstrument

      public boolean shouldInstrument(ClassDetails classDetails)
      Determine if SandboxClassLoader should instrument a given class.
      Parameters:
      classDetails - The class to check.
      Returns:
      True if the class should be instrumented.
    • shouldAcquire

      public boolean shouldAcquire(String name)
      Determine if SandboxClassLoader should load a given class.
      Parameters:
      name - The fully-qualified class name.
      Returns:
      True if the class should be loaded.
    • shouldAcquireResource

      public boolean shouldAcquireResource(String name)
      Determine if SandboxClassLoader should load a given resource.
      Parameters:
      name - The fully-qualified resource name.
      Returns:
      True if the resource should be loaded.
    • methodsToIntercept

      public Set<MethodRef> methodsToIntercept()
    • classNameTranslations

      public Map<String,String> classNameTranslations()
      Map from a requested class to an alternate stand-in, or not.
      Returns:
      Mapping of class name translations.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • remapParamType

      public String remapParamType(String desc)
    • remapParams

      public String remapParams(String desc)
    • mappedTypeName

      public String mappedTypeName(String internalName)