Home
last modified time | relevance | path

Searched refs:fields (Results 1 – 25 of 43) sorted by relevance

12

/libcore/luni/src/main/java/java/util/
DGregorianCalendar.java371 if (fields[ERA] == AD) { in add()
389 int month = fields[MONTH] + value; in add()
398 set(YEAR, fields[YEAR] + value); in add()
399 int days = daysInMonth(isLeapYear(fields[YEAR]), fields[MONTH]); in add()
400 if (fields[DATE] > days) { in add()
480 millis += fields[ZONE_OFFSET]; in fullFieldsCalc()
490 int dayOfYear = computeYearAndDay(days, time + fields[ZONE_OFFSET]); in fullFieldsCalc()
491 fields[DAY_OF_YEAR] = dayOfYear; in fullFieldsCalc()
492 if (fields[YEAR] == changeYear && gregorianCutover <= time + fields[ZONE_OFFSET]){ in fullFieldsCalc()
496 boolean leapYear = isLeapYear(fields[YEAR]); in fullFieldsCalc()
[all …]
DGrego.java115 public static int[] dayToFields(long day, int[] fields) { in dayToFields() argument
116 if (fields == null || fields.length < 5) { in dayToFields()
117 fields = new int[5]; in dayToFields()
151 fields[0] = year; in dayToFields()
152 fields[1] = month; in dayToFields()
153 fields[2] = dayOfMonth; in dayToFields()
154 fields[3] = dayOfWeek; in dayToFields()
155 fields[4] = dayOfYear; in dayToFields()
157 return fields; in dayToFields()
170 public static int[] timeToFields(long time, int[] fields) { in timeToFields() argument
[all …]
DSimpleTimeZone.java477 int[] fields = Grego.timeToFields(time + rawOffset, null); in getOffset() local
478 return getOffset(GregorianCalendar.AD, fields[0], fields[1], fields[2], in getOffset()
479 fields[3], fields[5]); in getOffset()
871 ObjectOutputStream.PutField fields = stream.putFields(); in writeObject() local
872 fields.put("dstSavings", dstSavings); in writeObject()
873 fields.put("endDay", sEndDay); in writeObject()
874 fields.put("endDayOfWeek", sEndDayOfWeek); in writeObject()
875 fields.put("endMode", endMode); in writeObject()
876 fields.put("endMonth", endMonth); in writeObject()
877 fields.put("endTime", endTime); in writeObject()
[all …]
DCalendar.java308 protected int[] fields; field in Calendar
718 fields = new int[FIELD_COUNT]; in Calendar()
795 fields[i] = 0; in clear()
807 fields[field] = 0; in clear()
819 clone.fields = fields.clone(); in clone()
898 return fields[field]; in get()
1069 return fields[field]; in internalGet()
1122 fields[field] = value; in set()
1236 result.append(fields[i]); in toString()
1382 putFields.put("fields", this.fields); in writeObject()
[all …]
/libcore/luni/src/test/java/libcore/java/io/
DOldObjectInputStreamGetFieldTest.java100 ObjectInputStream.GetField fields = object.getField; in test_defaultedLjava_lang_String() local
103 fields.defaulted("noField"); in test_defaultedLjava_lang_String()
108 fields.defaulted("longValue")); in test_defaultedLjava_lang_String()
114 fields = defaultedObject.getField; in test_defaultedLjava_lang_String()
117 fields.defaulted("longValue")); in test_defaultedLjava_lang_String()
124 ObjectInputStream.GetField fields = object.getField; in test_getException() local
128 fields.get("noValue", false); in test_getException()
134 fields.get("noValue", (byte) 0); in test_getException()
140 fields.get("noValue", (char) 0); in test_getException()
146 fields.get("noValue", 0.0); in test_getException()
[all …]
DSerializationTest.java37 ObjectStreamField[] fields = osc.getFields(); in testSerializeFieldMadeTransient() local
38 assertEquals(1, fields.length); in testSerializeFieldMadeTransient()
39 assertEquals("nonTransientInt", fields[0].getName()); in testSerializeFieldMadeTransient()
40 assertEquals(int.class, fields[0].getType()); in testSerializeFieldMadeTransient()
59 ObjectStreamField[] fields = osc.getFields(); in testSerializeFieldMadeStatic() local
60 assertEquals(0, fields.length); in testSerializeFieldMadeStatic()
DOldObjectOutputStreamTest.java53 ObjectInputStream.GetField fields = ois.readFields(); in readObject() local
54 aField1 = (String) fields.get("aField1", "Zap"); in readObject()
61 ObjectOutputStream.PutField fields = oos.putFields(); in writeObject() local
62 fields.put("aField1", aField1); in writeObject()
/libcore/luni/src/main/java/java/text/
DDecimalFormatSymbols.java607 ObjectOutputStream.PutField fields = stream.putFields(); in writeObject() local
608 fields.put("currencySymbol", currencySymbol); in writeObject()
609 fields.put("decimalSeparator", getDecimalSeparator()); in writeObject()
610 fields.put("digit", getDigit()); in writeObject()
611 fields.put("exponential", exponentSeparator.charAt(0)); in writeObject()
612 fields.put("exponentialSeparator", exponentSeparator); in writeObject()
613 fields.put("groupingSeparator", getGroupingSeparator()); in writeObject()
614 fields.put("infinity", infinity); in writeObject()
615 fields.put("intlCurrencySymbol", intlCurrencySymbol); in writeObject()
616 fields.put("minusSign", getMinusSign()); in writeObject()
[all …]
DDecimalFormat.java1106 ObjectOutputStream.PutField fields = stream.putFields(); in writeObject() local
1107 fields.put("positivePrefix", ndf.getPositivePrefix()); in writeObject()
1108 fields.put("positiveSuffix", ndf.getPositiveSuffix()); in writeObject()
1109 fields.put("negativePrefix", ndf.getNegativePrefix()); in writeObject()
1110 fields.put("negativeSuffix", ndf.getNegativeSuffix()); in writeObject()
1111 fields.put("posPrefixPattern", (String) null); in writeObject()
1112 fields.put("posSuffixPattern", (String) null); in writeObject()
1113 fields.put("negPrefixPattern", (String) null); in writeObject()
1114 fields.put("negSuffixPattern", (String) null); in writeObject()
1115 fields.put("multiplier", ndf.getMultiplier()); in writeObject()
[all …]
DNumberFormat.java709 ObjectOutputStream.PutField fields = stream.putFields();
710 fields.put("groupingUsed", groupingUsed);
711 fields.put("maxFractionDigits",
714 fields.put("maximumFractionDigits", maximumFractionDigits);
715 fields.put("maximumIntegerDigits", maximumIntegerDigits);
716 fields.put("maxIntegerDigits",
719 fields.put("minFractionDigits",
722 fields.put("minimumFractionDigits", minimumFractionDigits);
723 fields.put("minimumIntegerDigits", minimumIntegerDigits);
724 fields.put("minIntegerDigits",
[all …]
DMessageFormat.java513 ArrayList<FieldContainer> fields = new ArrayList<FieldContainer>(); in formatToCharacterIterator() local
516 formatImpl((Object[]) object, buffer, new FieldPosition(0), fields); in formatToCharacterIterator()
522 for (FieldContainer fc : fields) { in formatToCharacterIterator()
554 FieldPosition position, List<FieldContainer> fields) { in formatImpl() argument
566 handleArgumentField(begin, buffer.length(), argumentNumbers[i], position, fields); in formatImpl()
577 … handleArgumentField(begin, buffer.length(), argumentNumbers[i], position, fields); in formatImpl()
586 handleArgumentField(begin, buffer.length(), argumentNumbers[i], position, fields); in formatImpl()
587 handleFormat(format, arg, begin, fields); in formatImpl()
590 handleArgumentField(begin, buffer.length(), argumentNumbers[i], position, fields); in formatImpl()
591 handleFormat(format, arg, begin, fields); in formatImpl()
[all …]
DSimpleDateFormat.java471 ArrayList<FieldPosition> fields = new ArrayList<FieldPosition>(); in formatToCharacterIteratorImpl() local
474 formatImpl(date, buffer, null, fields); in formatToCharacterIteratorImpl()
480 for (FieldPosition pos : fields) { in formatToCharacterIteratorImpl()
515 FieldPosition field, List<FieldPosition> fields) { in formatImpl() argument
529 append(buffer, field, fields, (char) last, count); in formatImpl()
547 append(buffer, field, fields, (char) last, count); in formatImpl()
554 append(buffer, field, fields, (char) last, count); in formatImpl()
562 append(buffer, field, fields, (char) last, count); in formatImpl()
568 List<FieldPosition> fields, char format, int count) { in append() argument
679 if (fields != null) { in append()
[all …]
/libcore/luni/src/main/java/java/net/
DInet6Address.java254 ObjectOutputStream.PutField fields = stream.putFields(); in writeObject() local
256 fields.put("ipaddress", null); in writeObject()
258 fields.put("ipaddress", ipaddress); in writeObject()
261 fields.put("scope_id", scope_id); in writeObject()
262 fields.put("scope_id_set", scope_id_set); in writeObject()
263 fields.put("scope_ifname_set", scope_ifname_set); in writeObject()
264 fields.put("ifname", ifname); in writeObject()
269 ObjectInputStream.GetField fields = stream.readFields(); in readObject() local
270 ipaddress = (byte[]) fields.get("ipaddress", null); in readObject()
271 scope_id = fields.get("scope_id", 0); in readObject()
[all …]
DInetAddress.java860 ObjectOutputStream.PutField fields = stream.putFields(); in writeObject() local
862 fields.put("address", 0); in writeObject()
864 fields.put("address", Memory.peekInt(ipaddress, 0, ByteOrder.BIG_ENDIAN)); in writeObject()
866 fields.put("family", family); in writeObject()
867 fields.put("hostName", hostName); in writeObject()
873 ObjectInputStream.GetField fields = stream.readFields(); in readObject() local
874 int addr = fields.get("address", 0); in readObject()
877 hostName = (String) fields.get("hostName", null); in readObject()
878 family = fields.get("family", 2); in readObject()
/libcore/luni/src/main/java/javax/crypto/
DSealedObject.java64 ObjectInputStream.GetField fields = s.readFields(); in readObject() local
67 this.encodedParams = getSafeCopy(fields, "encodedParams"); in readObject()
68 this.encryptedContent = getSafeCopy(fields, "encryptedContent"); in readObject()
69 this.paramsAlg = (String) fields.get("paramsAlg", null); in readObject()
70 this.sealAlg = (String) fields.get("sealAlg", null); in readObject()
73 private static byte[] getSafeCopy(ObjectInputStream.GetField fields, String fieldName) in getSafeCopy() argument
75 byte[] fieldValue = (byte[]) fields.get(fieldName, null); in getSafeCopy()
/libcore/luni/src/main/java/java/io/
DObjectStreamClass.java167 private transient ObjectStreamField[] fields; field in ObjectStreamClass
296 ObjectStreamField[] fields = result.getFields(); in createClassDesc() local
298 if (fields != null) { in createClassDesc()
299 ObjectStreamField[] loadFields = new ObjectStreamField[fields.length]; in createClassDesc()
301 for (int i = 0; i < fields.length; ++i) { in createClassDesc()
302 loadFields[i] = new ObjectStreamField(fields[i].getName(), in createClassDesc()
303 fields[i].getType(), fields[i].isUnshared()); in createClassDesc()
393 fields = _fields; in buildFieldDescriptors()
407 private static long computeSerialVersionUID(Class<?> cl, Field[] fields) { in computeSerialVersionUID() argument
413 for (int i = 0; i < fields.length; i++) { in computeSerialVersionUID()
[all …]
DEmulatedFields.java79 public EmulatedFields(ObjectStreamField[] fields, ObjectStreamField[] declared) { in EmulatedFields() argument
81 buildSlots(fields); in EmulatedFields()
93 private void buildSlots(ObjectStreamField[] fields) { in buildSlots() argument
94 slotsToSerialize = new ObjectSlot[fields.length]; in buildSlots()
95 for (int i = 0; i < fields.length; i++) { in buildSlots()
98 s.field = fields[i]; in buildSlots()
DObjectOutputStream.java825 ObjectStreamField[] fields = null; in writeFieldDescriptors() local
831 fields = classDesc.fields(); in writeFieldDescriptors()
832 fieldCount = fields.length; in writeFieldDescriptors()
839 ObjectStreamField f = fields[i]; in writeFieldDescriptors()
928 for (ObjectStreamField fieldDesc : classDesc.fields()) { in writeFieldValues()
1729 ObjectStreamField[] fields = classDesc.getSuperclass().fields(); in writeNewEnum() local
1732 if (fields != null && fields.length > 1) { in writeNewEnum()
1733 Field field = classDesc.getSuperclass().checkAndGetReflectionField(fields[1]); in writeNewEnum()
/libcore/luni/src/main/java/java/lang/
DStringBuffer.java733 ObjectOutputStream.PutField fields = out.putFields(); in writeObject() local
734 fields.put("count", length()); in writeObject()
735 fields.put("shared", false); in writeObject()
736 fields.put("value", getValue()); in writeObject()
742 ObjectInputStream.GetField fields = in.readFields(); in readObject() local
743 int count = fields.get("count", 0); in readObject()
744 char[] value = (char[]) fields.get("value", null); in readObject()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/
DFieldTest.java430 Field fields[] = { objectField, byteField, shortField, charField, in testProtectedFieldAccess() local
440 for (int j = i; j < fields.length; j++) { in testProtectedFieldAccess()
441 Field field = fields[j]; in testProtectedFieldAccess()
461 Field field = fields[j]; in testProtectedFieldAccess()
477 for (int j = 0; j < fields.length; j++) { in testProtectedFieldAccess()
478 Field listedField = fields[j]; in testProtectedFieldAccess()
499 fields = newFields; in testProtectedFieldAccess()
505 Field field = fields[j]; in testProtectedFieldAccess()
523 for (int j = i + 1; j < fields.length; j++) { in testProtectedFieldAccess()
524 Field field = fields[j]; in testProtectedFieldAccess()
[all …]
/libcore/libart/src/main/java/java/lang/
DClass.java908 ArrayList<Field> fields = new ArrayList(initial_size); in getDeclaredFields() local
909 getDeclaredFieldsUnchecked(false, fields); in getDeclaredFields()
910 Field[] result = fields.toArray(new Field[fields.size()]); in getDeclaredFields()
925 public void getDeclaredFieldsUnchecked(boolean publicOnly, List<Field> fields) { in getDeclaredFieldsUnchecked() argument
929 fields.add(new Field(f)); in getDeclaredFieldsUnchecked()
936 fields.add(new Field(f)); in getDeclaredFieldsUnchecked()
968 private static ArtField findByName(String name, ArtField[] fields) { in findByName() argument
969 int low = 0, high = fields.length - 1; in findByName()
972 final ArtField f = fields[mid]; in findByName()
1124 List<Field> fields = new ArrayList<Field>(); in getFields() local
[all …]
/libcore/luni/src/test/java/libcore/java/net/
DOldSocketImplFactoryTest.java65 Field [] fields = Socket.class.getDeclaredFields(); in setUp() local
67 for (Field field : fields) { in setUp()
DOldDatagramSocketImplFactoryTest.java84 Field [] fields = DatagramSocket.class.getDeclaredFields(); in setUp() local
86 for (Field field : fields) { in setUp()
/libcore/luni/src/test/java/libcore/java/lang/reflect/
DReflectionTest.java264 Field[] fields = ExtendsImplementsDefinesMember.class.getFields(); in testGetFieldsViaExtendsThenImplements() local
265 assertTrue(names(fields).contains("field")); in testGetFieldsViaExtendsThenImplements()
269 Field[] fields = ImplementsExtendsDefinesMember.class.getFields(); in testGetFieldsViaImplementsThenExtends() local
270 assertTrue(names(fields).contains("field")); in testGetFieldsViaImplementsThenExtends()
299 Field[] fields = ExtendsAndImplementsDefinesMember.class.getFields(); in testGetFieldsContainsNoDuplicates() local
300 assertEquals(1, count(names(fields), "field")); in testGetFieldsContainsNoDuplicates()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DSerializationStressTest2.java114 ObjectInputStream.GetField fields = in.readFields(); in readObject() local
115 anInstanceVar = Integer.parseInt((String) fields.get( in readObject()
121 ObjectOutputStream.PutField fields = out.putFields(); in writeObject() local
122 fields.put(SIMULATED_FIELD_NAME, Integer.toString(anInstanceVar)); in writeObject()
144 ObjectInputStream.GetField fields = in.readFields(); in readObject() local
165 ObjectInputStream.GetField fields = in.readFields(); in readObject() local
170 ObjectOutputStream.PutField fields = out.putFields(); in writeObject() local
192 ObjectOutputStream.PutField fields = stream.putFields(); in writeObject() local
193 fields.put("field1", 1); in writeObject()
194 fields.put("field2", 2); in writeObject()
[all …]

12