Search in sources :

Example 91 with Field

use of java.lang.reflect.Field in project platform_frameworks_base by android.

the class ContentProviderOperationTest method operationGetSelection.

private String operationGetSelection(ContentProviderOperation operation) throws NoSuchFieldException, IllegalAccessException {
    final Field field = CLASS_OPERATION.getDeclaredField("mSelection");
    field.setAccessible(true);
    return (String) field.get(operation);
}
Also used : Field(java.lang.reflect.Field)

Example 92 with Field

use of java.lang.reflect.Field in project platform_frameworks_base by android.

the class ContentProviderOperationTest method builderSetSelectionArgsBackReferences.

private void builderSetSelectionArgsBackReferences(ContentProviderOperation.Builder builder, HashMap<Integer, Integer> selArgsBackRef) throws NoSuchFieldException, IllegalAccessException {
    Field field;
    field = CLASS_BUILDER.getDeclaredField("mSelectionArgsBackReferences");
    field.setAccessible(true);
    field.set(builder, selArgsBackRef);
}
Also used : Field(java.lang.reflect.Field)

Example 93 with Field

use of java.lang.reflect.Field in project platform_frameworks_base by android.

the class ContentProviderOperationTest method builderSetSelectionArgs.

private void builderSetSelectionArgs(ContentProviderOperation.Builder builder, String[] selArgs) throws NoSuchFieldException, IllegalAccessException {
    Field field;
    field = CLASS_BUILDER.getDeclaredField("mSelectionArgs");
    field.setAccessible(true);
    field.set(builder, selArgs);
}
Also used : Field(java.lang.reflect.Field)

Example 94 with Field

use of java.lang.reflect.Field in project platform_frameworks_base by android.

the class ContentProviderOperationTest method operationGetUri.

private Uri operationGetUri(ContentProviderOperation operation) throws NoSuchFieldException, IllegalAccessException {
    final Field field = CLASS_OPERATION.getDeclaredField("mUri");
    field.setAccessible(true);
    return (Uri) field.get(operation);
}
Also used : Field(java.lang.reflect.Field) Uri(android.net.Uri)

Example 95 with Field

use of java.lang.reflect.Field in project platform_frameworks_base by android.

the class ContentProviderOperationTest method operationGetExpectedCount.

private Integer operationGetExpectedCount(ContentProviderOperation operation) throws NoSuchFieldException, IllegalAccessException {
    final Field field = CLASS_OPERATION.getDeclaredField("mExpectedCount");
    field.setAccessible(true);
    return (Integer) field.get(operation);
}
Also used : Field(java.lang.reflect.Field)

Aggregations

Field (java.lang.reflect.Field)5144 Method (java.lang.reflect.Method)613 Test (org.junit.Test)538 ArrayList (java.util.ArrayList)490 IOException (java.io.IOException)318 HashMap (java.util.HashMap)318 Map (java.util.Map)296 InvocationTargetException (java.lang.reflect.InvocationTargetException)176 List (java.util.List)171 Pattern (java.util.regex.Pattern)122 Matcher (java.util.regex.Matcher)117 HashSet (java.util.HashSet)109 File (java.io.File)107 Annotation (java.lang.annotation.Annotation)98 Support_Field (tests.support.Support_Field)82 Collection (java.util.Collection)81 Test (org.testng.annotations.Test)68 Type (java.lang.reflect.Type)67 SienaException (siena.SienaException)65 Before (org.junit.Before)62