/libcore/json/src/test/java/org/json/ |
H A D | JSONObjectTest.java | 41 JSONObject object = new JSONObject(); 42 assertEquals(0, object.length()); 44 // bogus (but documented) behaviour: returns null rather than the empty object! 45 assertNull(object.names()); 48 assertNull(object.toJSONArray(new JSONArray())); 49 assertEquals("{}", object.toString()); 50 assertEquals("{}", object.toString(5)); 52 object.get("foo"); 57 object.getBoolean("foo"); 62 object [all...] |
H A D | JSONStringerTest.java | 41 stringer.object(); 77 stringer.object(); 156 new JSONStringer().object().endArray(); 161 new JSONStringer().object().key("a").key("a"); 166 new JSONStringer().object().value(false); 174 new JSONStringer().object().key(null); 182 stringer.object(); 192 stringer.object(); 222 new JSONStringer().object().key(original).value(false).endObject().toString()); 224 new JSONStringer().object() [all...] |
H A D | ParsingTest.java | 164 assertParsed(object("foo", 5), "{\"foo\": 5}"); 165 assertParsed(object("foo", 5), "{foo: 5}"); 166 assertParsed(object("foo", 5, "bar", "baz"), "{\"foo\": 5, \"bar\": \"baz\"}"); 167 assertParsed(object("foo", 5, "bar", "baz"), "{\"foo\": 5; \"bar\": \"baz\"}"); 168 assertParsed(object("foo", 5, "bar", "baz"), "{\"foo\"= 5; \"bar\"= \"baz\"}"); 169 assertParsed(object("foo", 5, "bar", "baz"), "{\"foo\"=> 5; \"bar\"=> \"baz\"}"); 170 assertParsed(object("foo", object(), "bar", array()), "{\"foo\"=> {}; \"bar\"=> []}"); 171 assertParsed(object("foo", object("fo 224 private JSONObject object(Object... keyValuePairs) throws JSONException { method in class:ParsingTest [all...] |
H A D | SelfUseTest.java | 42 private final JSONObject object = new JSONObject() { field in class:SelfUseTest 125 object.putOpt("foo", "bar"); 130 object.accumulate("foo", "bar"); 135 object.put("foo", "true"); 136 object.getBoolean("foo"); 141 object.optBoolean("foo"); 144 object.optDouble("foo"); 147 object.optInt("foo"); 150 object.optLong("foo"); 153 object [all...] |
/libcore/ojluni/src/main/java/java/security/ |
H A D | Guard.java | 29 * <p> This interface represents a guard, which is an object that is used 30 * to protect access to another object. 33 * with a single {@code object} argument. {@code checkGuard} is 35 * to determine whether or not to allow access to the object. 46 * Determines whether or not to allow access to the guarded object 47 * {@code object}. Returns silently if access is allowed. 50 * @param object the object being protected by the guard. 55 void checkGuard(Object object) throws SecurityException; argument
|
H A D | GuardedObject.java | 29 * A GuardedObject is an object that is used to protect access to 30 * another object. 32 * <p>A GuardedObject encapsulates a target object and a Guard object, 33 * such that access to the target object is possible 34 * only if the Guard object allows it. 35 * Once an object is encapsulated by a GuardedObject, 36 * access to that object is controlled by the {@code getObject} 38 * {@code checkGuard} method on the Guard object that is 53 private Object object; // th field in class:GuardedObject 66 GuardedObject(Object object, Guard guard) argument [all...] |
H A D | Permission.java | 36 public void checkGuard(Object object) throws SecurityException { } argument
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
H A D | Ser.java | 72 * This class wraps the object being serialized, and takes a byte representing the type of the class to 77 * In order to serialize the object it writes its byte and then calls back to the appropriate class where 78 * the serialization is performed. In order to deserialize the object it read in the type byte, switching 84 * {@link LocalDateTime} are serialized as one object. Enum classes are serialized using the index of their 111 /** The object being serialized. */ 112 private Object object; field in class:Ser 124 * @param object the object 126 Ser(byte type, Object object) { argument 128 this.object 160 writeInternal(byte type, Object object, ObjectOutput out) argument [all...] |
/libcore/ojluni/src/main/java/java/time/ |
H A D | Ser.java | 70 * This class wraps the object being serialized, and takes a byte representing the type of the class to 75 * In order to serialize the object it writes its byte and then calls back to the appropriate class where 76 * the serialization is performed. In order to deserialize the object it read in the type byte, switching 82 * {@link LocalDateTime} are serialized as one object. 113 /** The object being serialized. */ 114 private Object object; field in class:Ser 126 * @param object the object 128 Ser(byte type, Object object) { argument 130 this.object 165 writeInternal(byte type, Object object, ObjectOutput out) argument [all...] |
/libcore/json/src/main/java/org/json/ |
H A D | JSONArray.java | 92 Object object = readFrom.nextValue(); 93 if (object instanceof JSONArray) { 94 values = ((JSONArray) object).values; 96 throw JSON.typeMismatch(object, "JSONArray"); 327 Object object = get(index); 328 Boolean result = JSON.toBoolean(object); 330 throw JSON.typeMismatch(index, object, "boolean"); 348 Object object = opt(index); 349 Boolean result = JSON.toBoolean(object); 361 Object object [all...] |
H A D | JSONObject.java | 72 * named entry from the object but {@code put(name, JSONObject.NULL)} stores an 147 * object in the tokener. 159 Object object = readFrom.nextValue(); 160 if (object instanceof JSONObject) { 161 this.nameValuePairs = ((JSONObject) object).nameValuePairs; 163 throw JSON.typeMismatch(object, "JSONObject"); 171 * @param json a JSON-encoded string containing an object. 181 * from the given object. Names that aren't present in {@code copyFrom} will 195 * Returns the number of name/value mappings in this object. 205 * @return this object [all...] |
/libcore/luni/src/main/java/libcore/icu/ |
H A D | CollationKeyICU.java | 43 public boolean equals(Object object) { argument 44 if (object == this) { 47 if (!(object instanceof CollationKey)) { 50 return compareTo((CollationKey) object) == 0;
|
/libcore/ojluni/src/main/java/java/time/zone/ |
H A D | Ser.java | 99 /** The object being serialized. */ 100 private Object object; field in class:Ser 112 * @param object the object 114 Ser(byte type, Object object) { argument 116 this.object = object; 121 * Implements the {@code Externalizable} interface to write the object. 137 writeInternal(type, object, out); 140 static void write(Object object, DataOutpu argument 144 writeInternal(byte type, Object object, DataOutput out) argument [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
H A D | ParseExceptionTest.java | 57 Object object = ois.readObject(); 58 assertTrue("Not a ParseException", object instanceof ParseException); 59 ParseException parseException = (ParseException) object;
|
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/ |
H A D | MyGuard.java | 33 public void checkGuard(Object object) { argument
|
/libcore/luni/src/test/java/libcore/util/ |
H A D | SerializationTester.java | 82 private static byte[] serialize(Object object) throws IOException { argument 84 new ObjectOutputStream(out).writeObject(object); 112 * Returns a serialized-and-deserialized copy of {@code object}. 114 public static Object reserialize(Object object) throws IOException, ClassNotFoundException { argument 115 return deserialize(serialize(object)); 118 public static String serializeHex(Object object) throws IOException { argument 119 return hexEncode(serialize(object));
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
H A D | AbstractTCKTest.java | 90 protected static void assertSerializable(Object object) throws IOException, ClassNotFoundException { argument 91 assertEquals(object instanceof Serializable, true); 92 Object deserializedObject = writeThenRead(object); 93 assertEquals(deserializedObject, object); 96 protected static void assertSerializableSame(Object object) throws IOException, ClassNotFoundException { argument 97 assertEquals(object instanceof Serializable, true); 98 Object deserializedObject = writeThenRead(object); 99 assertSame(deserializedObject, object); 102 private static Object writeThenRead(Object object) throws IOException, ClassNotFoundException { argument 105 oos.writeObject(object); 112 assertSerializedBySer(Object object, byte[] expectedBytes, byte[]... matches) argument [all...] |
/libcore/luni/src/test/java/libcore/java/io/ |
H A D | OldObjectInputStreamGetFieldTest.java | 71 Support_GetPutFields object = (Support_GetPutFields) ois.readObject(); 75 assertTrue("Test 1: The object read from the reference file does " + 77 object.equals(newObject)); 86 assertTrue("Test 2: The object read from the reference file does " + 99 Support_GetPutFields object = (Support_GetPutFields) ois.readObject(); 100 ObjectInputStream.GetField fields = object.getField; 123 Support_GetPutFields object = (Support_GetPutFields) ois.readObject(); 124 ObjectInputStream.GetField fields = object.getField; 239 Support_GetPutFields object = (Support_GetPutFields) ois.readObject(); 241 object [all...] |
H A D | ObjectOutputStreamTest.java | 81 CallsCloseInWriteObjectMethod object = new CallsCloseInWriteObjectMethod(hello); 84 // the object closes the ObjectOutputStream and clears the handle table 87 // When it is deserialized the list contains object, hello, Arrays.asList().getClass() 88 // instead of object, hello, hello. 89 List<Serializable> input = Arrays.asList(object, hello, hello); 97 private Serializable roundTrip(Object object) argument 101 oos.writeObject(object);
|
/libcore/luni/src/test/java/libcore/java/lang/reflect/parameter/ |
H A D | ParameterMetadataTestClasses$-java_lang_Class_getLambdaClassWith1ParameterConstructor__LambdaImpl0.smali | 47 iput-object p1, p0, Llibcore/java/lang/reflect/parameter/ParameterMetadataTestClasses$-java_lang_Class_getLambdaClassWith1ParameterConstructor__LambdaImpl0;->val$this:Llibcore/java/lang/reflect/parameter/ParameterMetadataTestClasses; 57 iget-object v0, p0, Llibcore/java/lang/reflect/parameter/ParameterMetadataTestClasses$-java_lang_Class_getLambdaClassWith1ParameterConstructor__LambdaImpl0;->val$this:Llibcore/java/lang/reflect/parameter/ParameterMetadataTestClasses; 61 move-result-object v0 63 return-object v0
|
H A D | ParameterMetadataTestClasses$TestEnum.smali | 67 sput-object v0, Llibcore/java/lang/reflect/parameter/ParameterMetadataTestClasses$TestEnum;->ONE:Llibcore/java/lang/reflect/parameter/ParameterMetadataTestClasses$TestEnum; 75 sput-object v0, Llibcore/java/lang/reflect/parameter/ParameterMetadataTestClasses$TestEnum;->TWO:Llibcore/java/lang/reflect/parameter/ParameterMetadataTestClasses$TestEnum; 81 sget-object v1, Llibcore/java/lang/reflect/parameter/ParameterMetadataTestClasses$TestEnum;->ONE:Llibcore/java/lang/reflect/parameter/ParameterMetadataTestClasses$TestEnum; 83 aput-object v1, v0, v2 85 sget-object v1, Llibcore/java/lang/reflect/parameter/ParameterMetadataTestClasses$TestEnum;->TWO:Llibcore/java/lang/reflect/parameter/ParameterMetadataTestClasses$TestEnum; 87 aput-object v1, v0, v3 89 sput-object v0, Llibcore/java/lang/reflect/parameter/ParameterMetadataTestClasses$TestEnum;->$VALUES:[Llibcore/java/lang/reflect/parameter/ParameterMetadataTestClasses$TestEnum; 129 move-result-object v0 133 return-object v0 141 sget-object v [all...] |
H A D | ParameterMetadataTestClasses$1.smali | 65 iput-object p1, p0, Llibcore/java/lang/reflect/parameter/ParameterMetadataTestClasses$1;->this$0:Llibcore/java/lang/reflect/parameter/ParameterMetadataTestClasses; 86 move-result-object v0 88 return-object v0 101 iget-object v0, p0, Llibcore/java/lang/reflect/parameter/ParameterMetadataTestClasses$1;->this$0:Llibcore/java/lang/reflect/parameter/ParameterMetadataTestClasses; 105 move-result-object v0 107 return-object v0
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
H A D | GuardedObjectTest.java | 53 public void checkGuard(Object object) throws SecurityException { 54 if (object == objBuffer && objBuffer.length() == 0) {
|
/libcore/ojluni/src/main/java/java/util/function/ |
H A D | Predicate.java | 109 * @param targetRef the object reference with which to compare for equality, 117 : object -> targetRef.equals(object);
|
/libcore/support/src/test/java/org/apache/harmony/testframework/serialization/ |
H A D | SerializationTest.java | 105 * Returns golden file for an object being tested. 124 * returned by {@link #getData() getData()}to golden files, each object to 147 * Serializes specified object to an output stream. 158 * Deserializes single object from an input stream. 179 * @param initial - initial object used for creating serialized form 180 * @param deserialized - deserialized object 193 * Comparator for verifying that deserialized object is the same as initial. 253 * <code>object</code>. 257 * selected as </code>comparator</code>.<br>- if passed <code>object</code> 260 * method tries to select one of known comparators basing on <code>object' 269 defineComparator(Object test, Object object) argument 303 verifyGolden(Object test, Object object) argument 319 verifyGolden(Object test, Object object, SerializableAssert comparator) argument 373 verifySelf(Object object) argument 386 verifySelf(Object object, SerializableAssert comparator) argument 447 createGoldenFile(String root, TestCase test, Object object) argument [all...] |