Home
last modified time | relevance | path

Searched refs:instance (Results 1 – 25 of 59) sorted by relevance

123

/libcore/ojluni/src/test/java/util/Collections/
DSyncSubMutexes.java46 public void testCollections(Collection<String> instance) { in testCollections() argument
51 public void testLists(List<String> instance) { in testLists() argument
52 … assertSame(getSyncCollectionMutex(instance.subList(0, 1)), getSyncCollectionMutex(instance)); in testLists()
56 public void testSets(Set<String> instance) { in testSets() argument
62 public void testSortedSets(SortedSet<String> instance) { in testSortedSets() argument
63 … assertSame(getSyncCollectionMutex(instance.headSet("Echo")), getSyncCollectionMutex(instance)); in testSortedSets()
64 … assertSame(getSyncCollectionMutex(instance.tailSet("Charlie")), getSyncCollectionMutex(instance)); in testSortedSets()
65 …assertSame(getSyncCollectionMutex(instance.subSet("Charlie", "Echo")), getSyncCollectionMutex(inst… in testSortedSets()
70 public void testNavigableSets(NavigableSet<String> instance) { in testNavigableSets() argument
71 … assertSame(getSyncCollectionMutex(instance.descendingSet()), getSyncCollectionMutex(instance)); in testNavigableSets()
[all …]
/libcore/luni/src/test/java/libcore/java/lang/reflect/
DProxyTest.java122 ThrowsIOException instance = (ThrowsIOException) Proxy.newProxyInstance(loader, in testDeclaredExceptionIntersectionIsSubtype() local
126 instance.run(new EOFException()); in testDeclaredExceptionIntersectionIsSubtype()
131 instance.run(new IOException()); in testDeclaredExceptionIntersectionIsSubtype()
136 instance.run(new Exception()); in testDeclaredExceptionIntersectionIsSubtype()
143 ThrowsEOFException instance = (ThrowsEOFException) Proxy.newProxyInstance(loader, in testDeclaredExceptionIntersectionIsEmpty() local
147 instance.run(new EOFException()); in testDeclaredExceptionIntersectionIsEmpty()
152 instance.run(new SocketException()); in testDeclaredExceptionIntersectionIsEmpty()
159 ThrowsEOFException instance = (ThrowsEOFException) Proxy.newProxyInstance(loader, in testDeclaredExceptionIntersectionIsSubset() local
163 instance.run(new EOFException()); in testDeclaredExceptionIntersectionIsSubset()
168 instance.run(new SocketException()); in testDeclaredExceptionIntersectionIsSubset()
[all …]
/libcore/ojluni/src/main/java/javax/net/ssl/
DTrustManagerFactory.java154 GetInstance.Instance instance = GetInstance.getInstance in getInstance() local
157 return new TrustManagerFactory((TrustManagerFactorySpi)instance.impl, in getInstance()
158 instance.provider, algorithm); in getInstance()
198 GetInstance.Instance instance = GetInstance.getInstance in getInstance() local
201 return new TrustManagerFactory((TrustManagerFactorySpi)instance.impl, in getInstance()
202 instance.provider, algorithm); in getInstance()
235 GetInstance.Instance instance = GetInstance.getInstance in getInstance() local
238 return new TrustManagerFactory((TrustManagerFactorySpi)instance.impl, in getInstance()
239 instance.provider, algorithm); in getInstance()
DKeyManagerFactory.java152 GetInstance.Instance instance = GetInstance.getInstance in getInstance() local
155 return new KeyManagerFactory((KeyManagerFactorySpi)instance.impl, in getInstance()
156 instance.provider, algorithm); in getInstance()
196 GetInstance.Instance instance = GetInstance.getInstance in getInstance() local
199 return new KeyManagerFactory((KeyManagerFactorySpi)instance.impl, in getInstance()
200 instance.provider, algorithm); in getInstance()
233 GetInstance.Instance instance = GetInstance.getInstance in getInstance() local
236 return new KeyManagerFactory((KeyManagerFactorySpi)instance.impl, in getInstance()
237 instance.provider, algorithm); in getInstance()
DSSLContext.java199 GetInstance.Instance instance = GetInstance.getInstance in getInstance() local
201 return new SSLContext((SSLContextSpi)instance.impl, instance.provider, in getInstance()
242 GetInstance.Instance instance = GetInstance.getInstance in getInstance() local
244 return new SSLContext((SSLContextSpi)instance.impl, instance.provider, in getInstance()
279 GetInstance.Instance instance = GetInstance.getInstance in getInstance() local
281 return new SSLContext((SSLContextSpi)instance.impl, instance.provider, in getInstance()
/libcore/metrictests/memory/host/src/libcore/heapmetrics/
DReachability.java50 static final Reachability ofInstance(AhatInstance instance) { in ofInstance() argument
51 if (instance.isRoot()) { in ofInstance()
53 } else if (instance.isStronglyReachable()) { in ofInstance()
55 } else if (instance.isWeaklyReachable()) { in ofInstance()
57 } else if (instance.isUnreachable()) { in ofInstance()
60 throw new AssertionError("Impossible reachability data for instance " + instance); in ofInstance()
DHeapCategorization.java222 private static boolean isInternedString(AhatInstance instance) { in isInternedString() argument
223 if (!instance.isRoot()) { in isInternedString()
226 for (RootType rootType : instance.getRootTypes()) { in isInternedString()
298 AhatInstance instance = queue.remove(); in isOwnedByClassMatching() local
299 if (instance.isClassObj()) { in isOwnedByClassMatching()
303 return predicate.test(instance.asClassObj().getName()); in isOwnedByClassMatching()
304 } else if (instance.isPlaceHolder()) { in isOwnedByClassMatching()
310 AhatClassObj classObj = instance.getClassObj(); in isOwnedByClassMatching()
314 for (AhatInstance reference : instance.getHardReverseReferences()) { in isOwnedByClassMatching()
/libcore/ojluni/src/main/java/java/security/cert/
DCertPathBuilder.java173 Instance instance = GetInstance.getInstance("CertPathBuilder", in getInstance() local
175 return new CertPathBuilder((CertPathBuilderSpi)instance.impl, in getInstance()
176 instance.provider, algorithm); in getInstance()
219 Instance instance = GetInstance.getInstance("CertPathBuilder", in getInstance() local
221 return new CertPathBuilder((CertPathBuilderSpi)instance.impl, in getInstance()
222 instance.provider, algorithm); in getInstance()
259 Instance instance = GetInstance.getInstance("CertPathBuilder", in getInstance() local
261 return new CertPathBuilder((CertPathBuilderSpi)instance.impl, in getInstance()
262 instance.provider, algorithm); in getInstance()
DCertPathValidator.java174 Instance instance = GetInstance.getInstance("CertPathValidator", in getInstance() local
176 return new CertPathValidator((CertPathValidatorSpi)instance.impl, in getInstance()
177 instance.provider, algorithm); in getInstance()
221 Instance instance = GetInstance.getInstance("CertPathValidator", in getInstance() local
223 return new CertPathValidator((CertPathValidatorSpi)instance.impl, in getInstance()
224 instance.provider, algorithm); in getInstance()
261 Instance instance = GetInstance.getInstance("CertPathValidator", in getInstance() local
263 return new CertPathValidator((CertPathValidatorSpi)instance.impl, in getInstance()
264 instance.provider, algorithm); in getInstance()
DCertificateFactory.java206 Instance instance = GetInstance.getInstance("CertificateFactory", in getInstance() local
208 return new CertificateFactory((CertificateFactorySpi)instance.impl, in getInstance()
209 instance.provider, type); in getInstance()
255 Instance instance = GetInstance.getInstance("CertificateFactory", in getInstance() local
257 return new CertificateFactory((CertificateFactorySpi)instance.impl, in getInstance()
258 instance.provider, type); in getInstance()
298 Instance instance = GetInstance.getInstance("CertificateFactory", in getInstance() local
300 return new CertificateFactory((CertificateFactorySpi)instance.impl, in getInstance()
301 instance.provider, type); in getInstance()
DCertStore.java240 Instance instance = GetInstance.getInstance("CertStore", in getInstance() local
242 return new CertStore((CertStoreSpi)instance.impl, in getInstance()
243 instance.provider, type, params); in getInstance()
314 Instance instance = GetInstance.getInstance("CertStore", in getInstance() local
316 return new CertStore((CertStoreSpi)instance.impl, in getInstance()
317 instance.provider, type, params); in getInstance()
371 Instance instance = GetInstance.getInstance("CertStore", in getInstance() local
373 return new CertStore((CertStoreSpi)instance.impl, in getInstance()
374 instance.provider, type, params); in getInstance()
/libcore/ojluni/src/main/java/java/security/
DKeyPairGenerator.java191 private static KeyPairGenerator getInstance(Instance instance, in getInstance() argument
194 if (instance.impl instanceof KeyPairGenerator) { in getInstance()
195 kpg = (KeyPairGenerator)instance.impl; in getInstance()
197 KeyPairGeneratorSpi spi = (KeyPairGeneratorSpi)instance.impl; in getInstance()
200 kpg.provider = instance.provider; in getInstance()
265 Instance instance = in getInstance() local
267 if (instance.impl instanceof KeyPairGenerator) { in getInstance()
268 return getInstance(instance, algorithm); in getInstance()
270 return new Delegate(instance, t, algorithm); in getInstance()
323 Instance instance = GetInstance.getInstance("KeyPairGenerator", in getInstance() local
[all …]
DSecureRandom.java447 Instance instance = GetInstance.getInstance("SecureRandom", in getInstance() local
449 return new SecureRandom((SecureRandomSpi)instance.impl, in getInstance()
450 instance.provider, algorithm); in getInstance()
494 Instance instance = GetInstance.getInstance("SecureRandom", in getInstance() local
496 return new SecureRandom((SecureRandomSpi)instance.impl, in getInstance()
497 instance.provider, algorithm); in getInstance()
535 Instance instance = GetInstance.getInstance("SecureRandom", in getInstance() local
537 return new SecureRandom((SecureRandomSpi)instance.impl, in getInstance()
538 instance.provider, algorithm); in getInstance()
594 Instance instance = GetInstance.getInstance("SecureRandom", in getInstance() local
[all …]
DSignature.java381 Instance instance = in getInstance() local
383 return getInstance(instance, algorithm); in getInstance()
392 private static Signature getInstance(Instance instance, String algorithm) { in getInstance() argument
394 if (instance.impl instanceof Signature) { in getInstance()
395 sig = (Signature)instance.impl; in getInstance()
398 SignatureSpi spi = (SignatureSpi)instance.impl; in getInstance()
401 sig.provider = instance.provider; in getInstance()
432 Object instance = s.newInstance(null); in isSpi() local
436 boolean r = (instance instanceof SignatureSpi) in isSpi()
437 && (instance instanceof Signature == false); in isSpi()
[all …]
/libcore/ojluni/src/main/java/javax/crypto/
DExemptionMechanism.java136 Instance instance = JceSecurity.getInstance("ExemptionMechanism", in getInstance() local
138 return new ExemptionMechanism((ExemptionMechanismSpi)instance.impl, in getInstance()
139 instance.provider, algorithm); in getInstance()
184 Instance instance = JceSecurity.getInstance("ExemptionMechanism", in getInstance() local
186 return new ExemptionMechanism((ExemptionMechanismSpi)instance.impl, in getInstance()
187 instance.provider, algorithm); in getInstance()
224 Instance instance = JceSecurity.getInstance("ExemptionMechanism", in getInstance() local
226 return new ExemptionMechanism((ExemptionMechanismSpi)instance.impl, in getInstance()
227 instance.provider, algorithm); in getInstance()
DSecretKeyFactory.java390 Instance instance = JceSecurity.getInstance("SecretKeyFactory", in getInstance() local
392 return new SecretKeyFactory((SecretKeyFactorySpi)instance.impl, in getInstance()
393 instance.provider, algorithm); in getInstance()
432 Instance instance = JceSecurity.getInstance("SecretKeyFactory", in getInstance() local
434 return new SecretKeyFactory((SecretKeyFactorySpi)instance.impl, in getInstance()
435 instance.provider, algorithm); in getInstance()
/libcore/benchmarks/src/benchmarks/regression/
DReflectionBenchmark.java77 C instance = new C(); in timeField_setInt() local
79 f.setInt(instance, 1); in timeField_setInt()
86 C instance = new C(); in timeField_getInt() local
88 f.getInt(instance); in timeField_getInt()
95 C instance = new C(); in timeMethod_invokeV() local
97 m.invoke(instance); in timeMethod_invokeV()
112 C instance = new C(); in timeMethod_invokeI() local
114 m.invoke(instance, 1); in timeMethod_invokeI()
121 C instance = new C(); in timeMethod_invokePreBoxedI() local
124 m.invoke(instance, one); in timeMethod_invokePreBoxedI()
[all …]
/libcore/ojluni/src/test/java/lang/invoke/
DMethodTypeTest.java202 MethodType instance = instances[i]; in testMake_String_ClassLoader() local
203 String result = instance.toMethodDescriptorString(); in testMake_String_ClassLoader()
207 assertEquals("--#"+i, instance, parsed); in testMake_String_ClassLoader()
306 MethodType instance = mt_viS; in testParameterType() local
308 Class<?> result = instance.parameterType(num); in testParameterType()
320 MethodType instance = mt_viS; in testParameterCount() local
322 int result = instance.parameterCount(); in testParameterCount()
332 MethodType instance = mt_viS; in testReturnType() local
334 Class<?> result = instance.returnType(); in testReturnType()
345 MethodType instance = mt_viS; in testParameterList() local
[all …]
/libcore/ojluni/src/main/java/sun/net/www/protocol/jar/
DJarFileFactory.java51 private static final JarFileFactory instance = new JarFileFactory(); field in JarFileFactory
56 return instance; in getInstance()
61 synchronized (instance) { in getConnection()
80 synchronized (instance) { in get()
85 synchronized (instance) { in get()
113 synchronized (instance) { in close()
121 assert Thread.holdsLock(instance); in getCachedJarFile()
/libcore/ojluni/src/main/java/sun/net/ext/
DExtendedSocketOptions.java93 private static volatile ExtendedSocketOptions instance; field in ExtendedSocketOptions
95 public static final ExtendedSocketOptions getInstance() { return instance; } in getInstance()
99 if (instance != null) in register()
102 instance = extOptions; in register()
112 instance = new NoExtendedSocketOptions();
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/
DDOMImplementationImpl.java37 private static DOMImplementationImpl instance; field in DOMImplementationImpl
80 if (instance == null) { in getInstance()
81 instance = new DOMImplementationImpl(); in getInstance()
84 return instance; in getInstance()
/libcore/ojluni/src/main/java/sun/security/provider/certpath/
DCertPathHelper.java51 protected static CertPathHelper instance; field in CertPathHelper
64 instance.implSetPathToNames(sel, names); in setPathToNames()
68 instance.implSetDateAndTime(sel, date, skew); in setDateAndTime()
/libcore/luni/src/main/native/
DAsynchronousCloseMonitor.cpp155 void async_close_monitor_destroy(void* instance) { in async_close_monitor_destroy() argument
156 auto monitor = reinterpret_cast<AsynchronousCloseMonitorImpl*>(instance); in async_close_monitor_destroy()
160 int async_close_monitor_was_signalled(const void* instance) { in async_close_monitor_was_signalled() argument
161 auto monitor = reinterpret_cast<const AsynchronousCloseMonitorImpl*>(instance); in async_close_monitor_was_signalled()
/libcore/ojluni/src/main/java/java/util/
DCurrency.java273 Currency instance = instances.get(currencyCode); in getInstance() local
274 if (instance != null) { in getInstance()
275 return instance; in getInstance()
322 instance = instances.putIfAbsent(currencyCode, currencyVal); in getInstance()
323 return (instance != null ? instance : currencyVal); in getInstance()
/libcore/luni/src/main/java/libcore/net/
DNetworkSecurityPolicy.java41 private static volatile NetworkSecurityPolicy instance = new DefaultNetworkSecurityPolicy(); field in NetworkSecurityPolicy
64 return instance; in getInstance()
79 instance = policy; in setInstance()

123