test_class.declarator: mStorage
test_class.modifier: private
test_class.original_string: private AsyncStorageModule mStorage;
test_class.type: AsyncStorageModule
test_class.var_name: mStorage
test_class.declarator: mEmptyArray
test_class.modifier: private
test_class.original_string: private JavaOnlyArray mEmptyArray;
test_class.type: JavaOnlyArray
test_class.var_name: mEmptyArray
test_class.declarator: rule = new PowerMockRule()
test_class.modifier: @Rule
    public
test_class.original_string: @Rule
    public PowerMockRule rule = new PowerMockRule();
test_class.type: PowerMockRule
test_class.var_name: rule
test_class.file: node_modules/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/storage/AsyncStorageModuleTest.java
test_class.identifier: AsyncStorageModuleTest
test_case.body: @Test
    public void testClear() {
      JavaOnlyArray keyValues = new JavaOnlyArray();
      keyValues.pushArray(getArray("foo", "foo2"));
      keyValues.pushArray(getArray("bar", "bar2"));
      mStorage.multiSet(keyValues, mock(Callback.class));
  
      Callback clearCallback2 = mock(Callback.class);
      mStorage.clear(clearCallback2);
      Mockito.verify(clearCallback2, Mockito.times(1)).invoke();
  
      Callback getAllCallback2 = mock(Callback.class);
      mStorage.getAllKeys(getAllCallback2);
      Mockito.verify(getAllCallback2, Mockito.times(1)).invoke(null, mEmptyArray);
    }
test_case.class_method_signature: AsyncStorageModuleTest.testClear()
test_case.full_signature: @Test public void testClear()
test_case.identifier: testClear
test_case.invocations: pushArray getArray pushArray getArray multiSet mock mock clear invoke verify times mock getAllKeys invoke verify times
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testClear()
focal_class.declarator: MAX_SQL_KEYS = 999
focal_class.modifier: private static final
focal_class.original_string: private static final int MAX_SQL_KEYS = 999;
focal_class.type: int
focal_class.var_name: MAX_SQL_KEYS
focal_class.declarator: mReactDatabaseSupplier
focal_class.modifier: private
focal_class.original_string: private ReactDatabaseSupplier mReactDatabaseSupplier;
focal_class.type: ReactDatabaseSupplier
focal_class.var_name: mReactDatabaseSupplier
focal_class.declarator: mShuttingDown = false
focal_class.modifier: private
focal_class.original_string: private boolean mShuttingDown = false;
focal_class.type: boolean
focal_class.var_name: mShuttingDown
focal_class.file: node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/storage/AsyncStorageModule.java
focal_class.identifier: AsyncStorageModule
focal_class.interfaces: implements ModuleDataCleaner.Cleanable
focal_class.class_method_signature: AsyncStorageModule.AsyncStorageModule(ReactApplicationContext reactContext)
focal_class.full_signature: public  AsyncStorageModule(ReactApplicationContext reactContext)
focal_class.identifier: AsyncStorageModule
focal_class.modifiers: public
focal_class.parameters: (ReactApplicationContext reactContext)
focal_class.signature:  AsyncStorageModule(ReactApplicationContext reactContext)
focal_class.class_method_signature: AsyncStorageModule.getName()
focal_class.full_signature: @Override public String getName()
focal_class.identifier: getName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: AsyncStorageModule.initialize()
focal_class.full_signature: @Override public void initialize()
focal_class.identifier: initialize
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void initialize()
focal_class.class_method_signature: AsyncStorageModule.onCatalystInstanceDestroy()
focal_class.full_signature: @Override public void onCatalystInstanceDestroy()
focal_class.identifier: onCatalystInstanceDestroy
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void onCatalystInstanceDestroy()
focal_class.class_method_signature: AsyncStorageModule.clearSensitiveData()
focal_class.full_signature: @Override public void clearSensitiveData()
focal_class.identifier: clearSensitiveData
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clearSensitiveData()
focal_class.class_method_signature: AsyncStorageModule.multiGet(final ReadableArray keys, final Callback callback)
focal_class.full_signature: @ReactMethod public void multiGet(final ReadableArray keys, final Callback callback)
focal_class.identifier: multiGet
focal_class.modifiers: @ReactMethod public
focal_class.parameters: (final ReadableArray keys, final Callback callback)
focal_class.return: void
focal_class.signature: void multiGet(final ReadableArray keys, final Callback callback)
focal_class.class_method_signature: AsyncStorageModule.multiSet(final ReadableArray keyValueArray, final Callback callback)
focal_class.full_signature: @ReactMethod public void multiSet(final ReadableArray keyValueArray, final Callback callback)
focal_class.identifier: multiSet
focal_class.modifiers: @ReactMethod public
focal_class.parameters: (final ReadableArray keyValueArray, final Callback callback)
focal_class.return: void
focal_class.signature: void multiSet(final ReadableArray keyValueArray, final Callback callback)
focal_class.class_method_signature: AsyncStorageModule.multiRemove(final ReadableArray keys, final Callback callback)
focal_class.full_signature: @ReactMethod public void multiRemove(final ReadableArray keys, final Callback callback)
focal_class.identifier: multiRemove
focal_class.modifiers: @ReactMethod public
focal_class.parameters: (final ReadableArray keys, final Callback callback)
focal_class.return: void
focal_class.signature: void multiRemove(final ReadableArray keys, final Callback callback)
focal_class.class_method_signature: AsyncStorageModule.multiMerge(final ReadableArray keyValueArray, final Callback callback)
focal_class.full_signature: @ReactMethod public void multiMerge(final ReadableArray keyValueArray, final Callback callback)
focal_class.identifier: multiMerge
focal_class.modifiers: @ReactMethod public
focal_class.parameters: (final ReadableArray keyValueArray, final Callback callback)
focal_class.return: void
focal_class.signature: void multiMerge(final ReadableArray keyValueArray, final Callback callback)
focal_class.class_method_signature: AsyncStorageModule.clear(final Callback callback)
focal_class.full_signature: @ReactMethod public void clear(final Callback callback)
focal_class.identifier: clear
focal_class.modifiers: @ReactMethod public
focal_class.parameters: (final Callback callback)
focal_class.return: void
focal_class.signature: void clear(final Callback callback)
focal_class.class_method_signature: AsyncStorageModule.getAllKeys(final Callback callback)
focal_class.full_signature: @ReactMethod public void getAllKeys(final Callback callback)
focal_class.identifier: getAllKeys
focal_class.modifiers: @ReactMethod public
focal_class.parameters: (final Callback callback)
focal_class.return: void
focal_class.signature: void getAllKeys(final Callback callback)
focal_class.class_method_signature: AsyncStorageModule.ensureDatabase()
focal_class.full_signature: private boolean ensureDatabase()
focal_class.identifier: ensureDatabase
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean ensureDatabase()
focal_class.superclass: extends ReactContextBaseJavaModule
focal_method.body: @ReactMethod
    public void clear(final Callback callback) {
      new GuardedAsyncTask<Void, Void>(getReactApplicationContext()) {
        @Override
        protected void doInBackgroundGuarded(Void... params) {
          if (!mReactDatabaseSupplier.ensureDatabase()) {
            callback.invoke(AsyncStorageErrorUtil.getDBError(null));
            return;
          }
          try {
            mReactDatabaseSupplier.clear();
            callback.invoke();
          } catch (Exception e) {
            FLog.w(ReactConstants.TAG, e.getMessage(), e);
            callback.invoke(AsyncStorageErrorUtil.getError(null, e.getMessage()));
          }
        }
      }.execute();
    }
focal_method.class_method_signature: AsyncStorageModule.clear(final Callback callback)
focal_method.full_signature: @ReactMethod public void clear(final Callback callback)
focal_method.identifier: clear
focal_method.invocations: execute getReactApplicationContext ensureDatabase invoke getDBError clear invoke w getMessage invoke getError getMessage
focal_method.modifiers: @ReactMethod public
focal_method.parameters: (final Callback callback)
focal_method.return: void
focal_method.signature: void clear(final Callback callback)