Home
last modified time | relevance | path

Searched refs:field (Results 1 – 25 of 61) sorted by relevance

123

/libcore/luni/src/main/java/java/text/
DFieldPosition.java34 private int field; field in FieldPosition
42 public FieldPosition(int field) { in FieldPosition() argument
43 this.field = field; in FieldPosition()
51 this.field = -1; in FieldPosition()
57 public FieldPosition(Format.Field attribute, int field) { in FieldPosition() argument
59 this.field = field; in FieldPosition()
72 return field == pos.field && this.attribute == pos.attribute && in equals()
94 return field; in getField()
106 return attributeHash + field * 10 + beginIndex * 100 + endIndex; in hashCode()
129 ",field=" + field + in toString()
DSimpleDateFormat.java515 FieldPosition field, List<FieldPosition> fields) { in formatImpl() argument
519 if (field != null) { in formatImpl()
520 field.setBeginIndex(0); in formatImpl()
521 field.setEndIndex(0); in formatImpl()
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()
569 int field = -1; in append() local
606 field = Calendar.DATE; in append()
[all …]
DAttributedCharacterIterator.java130 for (Field field : getClass().getFields()) { in readResolve()
131 if (field.getType() == getClass() && Modifier.isStatic(field.getModifiers())) { in readResolve()
132 Attribute candidate = (Attribute) field.get(null); in readResolve()
/libcore/luni/src/main/java/java/util/
DCalendar.java748 public abstract void add(int field, int value); in add() argument
806 public final void clear(int field) { in clear() argument
807 fields[field] = 0; in clear()
808 isSet[field] = false; in clear()
896 public int get(int field) { in get() argument
898 return fields[field]; in get()
905 public int getActualMaximum(int field) { in getActualMaximum() argument
907 if (getMaximum(field) == (next = getLeastMaximum(field))) { in getActualMaximum()
912 set(field, next); in getActualMaximum()
915 roll(field, true); in getActualMaximum()
[all …]
DGregorianCalendar.java361 public void add(int field, int value) { in add() argument
365 if (field < 0 || field >= ZONE_OFFSET) { in add()
369 if (field == ERA) { in add()
386 if (field == YEAR || field == MONTH) { in add()
388 if (field == MONTH) { in add()
409 switch (field) { in add()
910 @Override public int getActualMaximum(int field) { in getActualMaximum() argument
912 if ((value = maximums[field]) == leastMaximums[field]) { in getActualMaximum()
919 switch (field) { in getActualMaximum()
974 public int getActualMinimum(int field) { in getActualMinimum() argument
[all …]
/libcore/luni/src/main/java/java/security/spec/
DEllipticCurve.java29 private final ECField field; field in EllipticCurve
59 public EllipticCurve(ECField field, BigInteger a, BigInteger b, byte[] seed) { in EllipticCurve() argument
60 this.field = field; in EllipticCurve()
61 if (this.field == null) { in EllipticCurve()
82 if (this.field instanceof ECFieldFp) { in EllipticCurve()
83 BigInteger p = ((ECFieldFp) this.field).getP(); in EllipticCurve()
90 } else if (this.field instanceof ECFieldF2m) { in EllipticCurve()
91 int fieldSizeInBits = this.field.getFieldSize(); in EllipticCurve()
114 public EllipticCurve(ECField field, BigInteger a, BigInteger b) { in EllipticCurve() argument
115 this(field, a, b, null); in EllipticCurve()
[all …]
/libcore/luni/src/test/java/libcore/java/text/
DOldNumberFormatFieldTest.java32 MyNumberFormat field = new MyNumberFormat(name); in test_ConstructorLjava_lang_String() local
33 assertEquals("field has wrong name", name, field.getName()); in test_ConstructorLjava_lang_String()
35 field = new MyNumberFormat(null); in test_ConstructorLjava_lang_String()
36 assertEquals("field has wrong name", null, field.getName()); in test_ConstructorLjava_lang_String()
48 MyNumberFormat field; in test_readResolve() local
52 field = new MyNumberFormat(null); in test_readResolve()
55 out.writeObject(field); in test_readResolve()
DOldMessageFormatFieldTest.java33 MyMessageFormat field = new MyMessageFormat(name); in test_ConstructorLjava_lang_String() local
34 assertEquals("field has wrong name", name, field.getName()); in test_ConstructorLjava_lang_String()
36 field = new MyMessageFormat(null); in test_ConstructorLjava_lang_String()
37 assertEquals("field has wrong name", null, field.getName()); in test_ConstructorLjava_lang_String()
53 MyMessageFormat field; in test_readResolve() local
57 field = new MyMessageFormat(null); in test_readResolve()
60 out.writeObject(field); in test_readResolve()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DDataFormatFieldTest.java37 MyField field = new MyField("day of month", Calendar.ERA); in test_ConstructorLjava_lang_StringLjava_lang_String() local
39 assertEquals("field has wrong name", "day of month", field.getName()); in test_ConstructorLjava_lang_StringLjava_lang_String()
41 field.getCalendarField()); in test_ConstructorLjava_lang_StringLjava_lang_String()
70 MyField field = new MyField("a field", Calendar.DAY_OF_WEEK); in test_ConstructorLjava_lang_StringI() local
72 assertEquals("field has wrong name", "a field", field.getName()); in test_ConstructorLjava_lang_StringI()
74 Calendar.DAY_OF_WEEK, field.getCalendarField()); in test_ConstructorLjava_lang_StringI()
86 MyField field = new MyField("day of month", Calendar.ERA); in test_Constructor2() local
88 assertEquals("field has wrong name", "day of month", field.getName()); in test_Constructor2()
90 field.getCalendarField()); in test_Constructor2()
182 MyField field; in test_readResolve() local
[all …]
DChoiceFormatTest.java251 FieldPosition field = new FieldPosition(0); in test_formatDLjava_lang_StringBufferLjava_text_FieldPosition() local
253 String r = f1.format(-1, buf, field).toString(); in test_formatDLjava_lang_StringBufferLjava_text_FieldPosition()
256 r = f1.format(0, buf, field).toString(); in test_formatDLjava_lang_StringBufferLjava_text_FieldPosition()
259 r = f1.format(1, buf, field).toString(); in test_formatDLjava_lang_StringBufferLjava_text_FieldPosition()
262 r = f1.format(2, buf, field).toString(); in test_formatDLjava_lang_StringBufferLjava_text_FieldPosition()
265 r = f1.format(3, buf, field).toString(); in test_formatDLjava_lang_StringBufferLjava_text_FieldPosition()
271 assertEquals("Less than one", f1.format(Double.NaN, new StringBuffer(), field).toString()); in test_formatDLjava_lang_StringBufferLjava_text_FieldPosition()
282 FieldPosition field = new FieldPosition(0); in test_formatJLjava_lang_StringBufferLjava_text_FieldPosition() local
284 String r = f1.format(0.5, buf, field).toString(); in test_formatJLjava_lang_StringBufferLjava_text_FieldPosition()
287 r = f1.format(1.5, buf, field).toString(); in test_formatJLjava_lang_StringBufferLjava_text_FieldPosition()
[all …]
/libcore/luni/src/main/java/java/io/
DEmulatedFields.java36 ObjectStreamField field; field in EmulatedFields.ObjectSlot
51 return field; in getField()
98 s.field = fields[i]; in buildSlots()
148 if (slot.field.getName().equals(fieldName)) { in findSlot()
152 if (slot.field.getType() == fieldType) { in findSlot()
161 if (slot.field.getType().isAssignableFrom(fieldType)) { in findSlot()
170 ObjectStreamField field = declaredFields[i]; in findSlot() local
171 if (field.getName().equals(fieldName)) { in findSlot()
172 if (isPrimitive ? fieldType == field.getType() : fieldType == null || in findSlot()
173 field.getType().isAssignableFrom(fieldType)) { in findSlot()
[all …]
DObjectStreamClass.java198 Field field = reflectionFields.get(osf); in checkAndGetReflectionField() local
201 if (field != null || reflectionFields.containsKey(osf)) { in checkAndGetReflectionField()
202 return field; in checkAndGetReflectionField()
206 Field field; in checkAndGetReflectionField() local
209 field = declaringClass.getDeclaredField(osf.getName()); in checkAndGetReflectionField()
211 int modifiers = field.getModifiers(); in checkAndGetReflectionField()
215 field = null; in checkAndGetReflectionField()
217 field.setAccessible(true); in checkAndGetReflectionField()
221 field = null; in checkAndGetReflectionField()
225 reflectionFields.put(osf, field); in checkAndGetReflectionField()
[all …]
/libcore/luni/src/main/java/libcore/icu/
DNativeDecimalFormat.java283 public char[] formatBigDecimal(BigDecimal value, FieldPosition field) { in formatBigDecimal() argument
284 FieldPositionIterator fpi = FieldPositionIterator.forFieldPosition(field); in formatBigDecimal()
286 if (fpi != null && field != null) { in formatBigDecimal()
287 updateFieldPosition(field, fpi); in formatBigDecimal()
292 public char[] formatBigInteger(BigInteger value, FieldPosition field) { in formatBigInteger() argument
293 FieldPositionIterator fpi = FieldPositionIterator.forFieldPosition(field); in formatBigInteger()
295 if (fpi != null && field != null) { in formatBigInteger()
296 updateFieldPosition(field, fpi); in formatBigInteger()
301 public char[] formatLong(long value, FieldPosition field) { in formatLong() argument
302 FieldPositionIterator fpi = FieldPositionIterator.forFieldPosition(field); in formatLong()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/
DFieldTest.java81 S field; field in FieldTest.GenericField
153 int field; field in FieldTest.TestEnum
441 Field field = fields[j]; in testProtectedFieldAccess() local
442 fieldName = field.getName(); in testProtectedFieldAccess()
444 if (field == charField && type != 'C') { in testProtectedFieldAccess()
448 subclass.setField(type, subclass, field, in testProtectedFieldAccess()
452 subclass.setField(type, subclass, field, null, value); in testProtectedFieldAccess()
453 subclass.setField(type, otherSubclass, field, null, value); in testProtectedFieldAccess()
454 subclass.setField(type, parentClass, field, in testProtectedFieldAccess()
456 subclass.setField(type, plainObject, field, in testProtectedFieldAccess()
[all …]
DGenericArrayTypeTest.java36 Field field = clazz.getDeclaredField("array"); in testGetGenericComponentType() local
37 Type genericType = field.getGenericType(); in testGetGenericComponentType()
53 Field field = clazz.getDeclaredField("array"); in testParameterizedComponentType() local
54 Type genericType = field.getGenericType(); in testParameterizedComponentType()
DParameterizedTypeTest.java67 Field field = clazz.getDeclaredField("e"); in testParameterizedMemeber() local
68 assertInstanceOf(ParameterizedType.class, field.getGenericType()); in testParameterizedMemeber()
69 ParameterizedType parameterizedType = (ParameterizedType) field.getGenericType(); in testParameterizedMemeber()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DCalendarTest.java742 public int internal_get(int field) { in internal_get() argument
743 return super.internalGet(field); in internal_get()
754 public void add(int field, int value) { in add() argument
766 public int getGreatestMinimum(int field) { in getGreatestMinimum() argument
771 public int getLeastMaximum(int field) { in getLeastMaximum() argument
776 public int getMaximum(int field) { in getMaximum() argument
781 public int getMinimum(int field) { in getMinimum() argument
786 public void roll(int field, boolean increment) { in roll() argument
796 for (int field = 0; field < Calendar.FIELD_COUNT; field++) { in test_getDisplayNameIILjava_util_Locale()
800 switch (field) { in test_getDisplayNameIILjava_util_Locale()
[all …]
/libcore/luni/src/main/java/java/util/concurrent/atomic/
DAtomicLongFieldUpdater.java247 final Field field; in CASUpdater() local
251 field = tclass.getDeclaredField(fieldName); // android-changed in CASUpdater()
253 modifiers = field.getModifiers(); in CASUpdater()
272 Class<?> fieldt = field.getType(); in CASUpdater()
282 offset = unsafe.objectFieldOffset(field); in CASUpdater()
341 Field field = null; in LockedUpdater() local
345 field = tclass.getDeclaredField(fieldName); // android-changed in LockedUpdater()
347 modifiers = field.getModifiers(); in LockedUpdater()
366 Class<?> fieldt = field.getType(); in LockedUpdater()
376 offset = unsafe.objectFieldOffset(field); in LockedUpdater()
DAtomicIntegerFieldUpdater.java247 final Field field; in AtomicIntegerFieldUpdaterImpl() local
251 field = tclass.getDeclaredField(fieldName); // android-changed in AtomicIntegerFieldUpdaterImpl()
254 modifiers = field.getModifiers(); in AtomicIntegerFieldUpdaterImpl()
273 Class<?> fieldt = field.getType(); in AtomicIntegerFieldUpdaterImpl()
283 offset = unsafe.objectFieldOffset(field); in AtomicIntegerFieldUpdaterImpl()
DAtomicReferenceFieldUpdater.java178 final Field field; in AtomicReferenceFieldUpdaterImpl() local
183 field = tclass.getDeclaredField(fieldName); // android-changed in AtomicReferenceFieldUpdaterImpl()
185 modifiers = field.getModifiers(); in AtomicReferenceFieldUpdaterImpl()
196 fieldClass = field.getType(); in AtomicReferenceFieldUpdaterImpl()
218 offset = unsafe.objectFieldOffset(field); in AtomicReferenceFieldUpdaterImpl()
/libcore/luni/src/main/java/java/net/
DURLConnection.java352 public static String getDefaultRequestProperty(String field) { in getDefaultRequestProperty() argument
481 public void addRequestProperty(String field, String newValue) { in addRequestProperty() argument
483 if (field == null) { in addRequestProperty()
518 public long getHeaderFieldDate(String field, long defaultValue) { in getHeaderFieldDate() argument
519 String date = getHeaderField(field); in getHeaderFieldDate()
541 public int getHeaderFieldInt(String field, int defaultValue) { in getHeaderFieldInt() argument
543 return Integer.parseInt(getHeaderField(field)); in getHeaderFieldInt()
645 public String getRequestProperty(String field) { in getRequestProperty() argument
834 public static void setDefaultRequestProperty(String field, String value) { in setDefaultRequestProperty() argument
925 public void setRequestProperty(String field, String newValue) { in setRequestProperty() argument
[all …]
/libcore/benchmarks/src/benchmarks/regression/
DAnnotatedElementBenchmark.java29 private Field field; field in AnnotatedElementBenchmark
34 field = Type.class.getField("field"); in setUp()
49 field.getAnnotations(); in timeGetFieldAnnotations()
73 field.getAnnotation(Marker.class); in timeGetFieldAnnotation()
91 field.isAnnotationPresent(Marker.class); in timeIsFieldAnnotationPresent()
153 @Marker public String field; field in AnnotatedElementBenchmark.Type
/libcore/support/src/test/java/tests/support/
DSupport_Format.java37 String text, Format.Field field, int begin, int end) { in t_FormatWithField() argument
39 FieldPosition pos = new FieldPosition(field); in t_FormatWithField()
54 + field, begin, pos.getBeginIndex()); in t_FormatWithField()
56 + field, end, pos.getEndIndex()); in t_FormatWithField()
/libcore/benchmarks/src/benchmarks/
DMethodInvocationBenchmark.java32 private int field; field in MethodInvocationBenchmark.C
35 return field; in getField()
49 result = field; in timeInternalFieldAccess()
/libcore/luni/src/test/java/libcore/java/lang/reflect/
DFieldTest.java27 Field field = getClass().getDeclaredField("MY_LONG"); in testLongFieldReflection() local
28 assertEquals(5073258162644648461L, field.getLong(null)); in testLongFieldReflection()

123