Home
last modified time | relevance | path

Searched refs:ref (Results 1 – 25 of 77) sorted by relevance

1234

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ref/
DReferenceTest.java17 package org.apache.harmony.tests.java.lang.ref;
19 import java.lang.ref.PhantomReference;
20 import java.lang.ref.Reference;
21 import java.lang.ref.ReferenceQueue;
22 import java.lang.ref.SoftReference;
23 import java.lang.ref.WeakReference;
25 import libcore.java.lang.ref.FinalizationTester;
91 Reference ref = new SoftReference(obj, rq); in test_enqueue() local
92 assertTrue("Enqueue failed.", (!ref.isEnqueued()) in test_enqueue()
93 && ((ref.enqueue()) && (ref.isEnqueued()))); in test_enqueue()
[all …]
DSoftReferenceTest.java17 package org.apache.harmony.tests.java.lang.ref;
19 import java.lang.ref.Reference;
20 import java.lang.ref.ReferenceQueue;
21 import java.lang.ref.SoftReference;
23 import libcore.java.lang.ref.FinalizationTester;
102 Reference ref; in test_get_SoftReference() local
127 ref = rq.poll(); in test_get_SoftReference()
128 assertNotNull("Object not garbage collected.", ref); in test_get_SoftReference()
129 assertNull("Object is not null.", ref.get()); in test_get_SoftReference()
DPhantomReferenceTest.java18 package org.apache.harmony.tests.java.lang.ref;
20 import java.lang.ref.PhantomReference;
21 import java.lang.ref.Reference;
22 import java.lang.ref.ReferenceQueue;
23 import libcore.java.lang.ref.FinalizationTester;
DWeakReferenceTest.java18 package org.apache.harmony.tests.java.lang.ref;
20 import java.lang.ref.ReferenceQueue;
21 import java.lang.ref.WeakReference;
DReferenceQueueTest.java18 package org.apache.harmony.tests.java.lang.ref;
20 import java.lang.ref.PhantomReference;
21 import java.lang.ref.Reference;
22 import java.lang.ref.ReferenceQueue;
23 import java.lang.ref.SoftReference;
24 import java.lang.ref.WeakReference;
26 import libcore.java.lang.ref.FinalizationTester;
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DSortedMapTestBase.java44 SortedMap<Integer, Integer> ref; field in SortedMapTestBase
51 ref.put(rnd.nextInt(N) * 2, rnd.nextBoolean() ? null : rnd.nextInt(N) * 2); in setUp()
63 assertEquals(ref.containsKey(key), map.containsKey(key)); in testContainsKey()
71 assertEquals(ref.containsValue(value), map.containsValue(value)); in testContainsValue()
77 Set<Map.Entry<Integer, Integer>> refSet = ref.entrySet(); in testEntrySet()
85 assertEquals(ref.entrySet(), map.entrySet()); in testEntrySet()
92 assertEquals(ref.get(key), map.get(key)); in testGet()
98 assertEquals(ref.keySet(), map.keySet()); in testKeySet()
99 Iterator<Integer> i = ref.keySet().iterator(); in testKeySet()
115 assertEquals(ref.put(key, value), map.put(key, value)); in testPut()
[all …]
DTreeMapRndTest.java24 ref = new RefSortedMap<Integer, Integer>(); in setUp()
26 map = new TreeMap<Integer, Integer>(ref); in setUp()
/libcore/luni/src/test/java/libcore/java/io/
DOldInputStreamTest.java88 byte[] ref = testString.getBytes(); in test_read$B()
98 equal &= (b[i] == ref[i]); in test_read$B()
104 b = new byte[ref.length]; in test_read$B()
107 bytesRead, ref.length - 10); in test_read$B()
110 equal &= (b[i] == ref[i + 10]); in test_read$B()
168 byte[] ref = testString.getBytes(); in test_read$BII()
178 equal &= (b[i] == ref[i]); in test_read$BII()
187 equal &= (b[i] == ref[i]); in test_read$BII()
193 b = new byte[ref.length]; in test_read$BII()
198 bytesRead, ref.length - 8); in test_read$BII()
[all …]
/libcore/ojluni/src/main/java/sun/nio/ch/
DFileLockTable.java31 import java.lang.ref.*;
184 FileLockReference ref = list.get(index); in remove() local
185 FileLock lock = ref.get(); in remove()
188 ref.clear(); in remove()
205 FileLockReference ref = list.get(index); in removeAll() local
206 FileLock lock = ref.get(); in removeAll()
211 ref.clear(); in removeAll()
236 FileLockReference ref = list.get(index); in replace() local
237 FileLock lock = ref.get(); in replace()
239 ref.clear(); in replace()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/net/
DHttpRetryExceptionTest.java38 HttpRetryException ref = (HttpRetryException) reference;
41 assertEquals("getLocation", ref.getLocation(), tst.getLocation());
42 assertEquals("responseCode", ref.responseCode(), tst.responseCode());
43 assertEquals("getReason", ref.getReason(), tst.getReason());
44 assertEquals("getMessage", ref.getMessage(), tst.getMessage());
/libcore/ojluni/src/main/java/java/net/
DURL.java204 private String ref; field in URL
411 ref = parts.getRef(); in URL()
603 ref = spec.substring(i + 1, limit); in URL()
613 if (ref == null) { in URL()
614 ref = context.ref; in URL()
668 int port, String file, String ref) { in set() argument
675 this.ref = ref; in set()
706 String query, String ref) { in set() argument
714 this.ref = ref; in set()
833 return ref; in getRef()
[all …]
DURLStreamHandler.java134 String ref = u.getRef(); in parseURL() local
346 setURL(u, protocol, host, port, authority, userInfo, path, query, ref); in parseURL()
539 String query, String ref) { in setURL() argument
545 u.set(u.getProtocol(), host, port, authority, userInfo, path, query, ref); in setURL() local
566 String file, String ref) { in setURL() argument
595 setURL(u, protocol, host, port, authority, userInfo, path, query, ref); in setURL()
/libcore/benchmarks/src/benchmarks/
DReferenceGetBenchmark.java20 import java.lang.ref.Reference;
21 import java.lang.ref.SoftReference;
22 import java.lang.ref.WeakReference;
DReferenceBenchmark.java19 import java.lang.ref.PhantomReference;
20 import java.lang.ref.ReferenceQueue;
/libcore/ojluni/src/main/java/java/util/logging/
DLogManager.java33 import java.lang.ref.ReferenceQueue;
34 import java.lang.ref.WeakReference;
498 LoggerWeakRef ref = namedLoggers.get(name); in findLogger() local
499 if (ref == null) { in findLogger()
502 Logger logger = ref.get(); in findLogger()
597 LoggerWeakRef ref = namedLoggers.get(name); in addLocalLogger() local
598 if (ref != null) { in addLocalLogger()
599 if (ref.get() == null) { in addLocalLogger()
612 ref = manager.new LoggerWeakRef(logger); in addLocalLogger()
613 namedLoggers.put(name, ref); in addLocalLogger()
[all …]
DLogger.java31 import java.lang.ref.WeakReference;
1584 LogManager.LoggerWeakRef ref = null;
1588 ref = iter.next();
1589 Logger kid = ref.get();
1595 ref = null;
1606 if (ref == null) {
1608 ref = manager.new LoggerWeakRef(this);
1610 ref.setParentRef(new WeakReference<Logger>(parent));
1611 parent.kids.add(ref);
1626 LogManager.LoggerWeakRef ref = iter.next();
[all …]
/libcore/ojluni/src/main/java/java/text/
DDateFormatSymbols.java46 import java.lang.ref.SoftReference;
445 SoftReference<DateFormatSymbols> ref = cachedInstances.get(locale); in getCachedInstance() local
447 if (ref == null || (dfs = ref.get()) == null) { in getCachedInstance()
449 ref = new SoftReference<DateFormatSymbols>(dfs); in getCachedInstance()
450 SoftReference<DateFormatSymbols> x = cachedInstances.putIfAbsent(locale, ref); in getCachedInstance()
457 cachedInstances.put(locale, ref); in getCachedInstance()
775 SoftReference<DateFormatSymbols> ref = cachedInstances.get(locale); in initializeData() local
777 if (ref != null && (dfs = ref.get()) != null) { in initializeData()
/libcore/ojluni/src/main/java/java/lang/ref/
Dpackage-info.java135 package java.lang.ref;
DPhantomReference.java26 package java.lang.ref;
DWeakReference.java26 package java.lang.ref;
/libcore/luni/src/test/java/libcore/java/lang/ref/
DReferenceQueueTest.java17 package libcore.java.lang.ref;
19 import java.lang.ref.ReferenceQueue;
20 import java.lang.ref.WeakReference;
/libcore/luni/src/test/java/libcore/java/net/
DOldURLStreamHandlerTest.java217 String ref) { in setURL() argument
218 super.setURL(u, protocol, host, port, file, ref); in setURL()
229 String ref) { in setURL() argument
231 userInfo, path, query, ref); in setURL()
/libcore/ojluni/src/main/java/java/io/
DObjectStreamClass.java28 import java.lang.ref.Reference;
29 import java.lang.ref.ReferenceQueue;
30 import java.lang.ref.SoftReference;
31 import java.lang.ref.WeakReference;
312 Reference<?> ref = Caches.localDescs.get(key); in lookup() local
314 if (ref != null) { in lookup()
315 entry = ref.get(); in lookup()
322 if (ref != null) { in lookup()
323 Caches.localDescs.remove(key, ref); in lookup()
325 ref = Caches.localDescs.putIfAbsent(key, newRef); in lookup()
[all …]
/libcore/support/src/test/java/libcore/java/lang/ref/
DFinalizationTester.java17 package libcore.java.lang.ref;
/libcore/ojluni/src/main/java/sun/util/locale/
DLocaleObjectCache.java34 import java.lang.ref.ReferenceQueue;
35 import java.lang.ref.SoftReference;

1234