Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 11 java.naming.jmod - Naming Module
JDK 11 java.naming.jmod is the JMOD file for JDK 11 Naming module.
JDK 11 Naming module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.naming.jmod.
JDK 11 Naming module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Naming module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.naming.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/jndi/toolkit/dir/LazySearchEnumerationImpl.java
/* * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ /** * Given an enumeration of candidates, check whether each * item in enumeration satifies the given filter. * Each item is a Binding and the following is used to get its * attributes for used by the filter: * * ((DirContext)item.getObject()).getAttributes(""). * If item.getObject() is not an DirContext, the item is skipped * * The items in the enumeration are obtained one at a time as * items from the search enumeration are requested. * * @author Rosanna Lee */ package com.sun.jndi.toolkit.dir; import javax.naming.*; import javax.naming.directory.*; import javax.naming.spi.DirectoryManager; import java.util.NoSuchElementException; import java.util.Hashtable; final public class LazySearchEnumerationImpl implements NamingEnumeration<SearchResult> { private NamingEnumeration<Binding> candidates; private SearchResult nextMatch = null; private SearchControls cons; private AttrFilter filter; private Context context; private Hashtable<String, Object> env; private boolean useFactory = true; public LazySearchEnumerationImpl(NamingEnumeration<Binding> candidates, AttrFilter filter, SearchControls cons) throws NamingException { this.candidates = candidates; this.filter = filter; if(cons == null) { this.cons = new SearchControls(); } else { this.cons = cons; } } @SuppressWarnings("unchecked") // For Hashtable clone: env.clone() public LazySearchEnumerationImpl(NamingEnumeration<Binding> candidates, AttrFilter filter, SearchControls cons, Context ctx, Hashtable<String, Object> env, boolean useFactory) throws NamingException { this.candidates = candidates; this.filter = filter; this.env = (Hashtable<String, Object>) ((env == null) ? null : env.clone()); this.context = ctx; this.useFactory = useFactory; if(cons == null) { this.cons = new SearchControls(); } else { this.cons = cons; } } public LazySearchEnumerationImpl(NamingEnumeration<Binding> candidates, AttrFilter filter, SearchControls cons, Context ctx, Hashtable<String, Object> env) throws NamingException { this(candidates, filter, cons, ctx, env, true); } public boolean hasMore() throws NamingException { // find and do not remove from list return findNextMatch(false) != null; } public boolean hasMoreElements() { try { return hasMore(); } catch (NamingException e) { return false; } } public SearchResult nextElement() { try { return findNextMatch(true); } catch (NamingException e) { throw new NoSuchElementException(e.toString()); } } public SearchResult next() throws NamingException { // find and remove from list return (findNextMatch(true)); } public void close() throws NamingException { if (candidates != null) { candidates.close(); } } private SearchResult findNextMatch(boolean remove) throws NamingException { SearchResult answer; if (nextMatch != null) { answer = nextMatch; if (remove) { nextMatch = null; } return answer; } else { // need to find next match Binding next; Object obj; Attributes targetAttrs; while (candidates.hasMore()) { next = candidates.next(); obj = next.getObject(); if (obj instanceof DirContext) { targetAttrs = ((DirContext)(obj)).getAttributes(""); if (filter.check(targetAttrs)) { if (!cons.getReturningObjFlag()) { obj = null; } else if (useFactory) { try { // Give name only if context non-null, // otherwise, name will be interpreted relative // to initial context (not what we want) Name nm = (context != null ? new CompositeName(next.getName()) : null); obj = DirectoryManager.getObjectInstance(obj, nm, context, env, targetAttrs); } catch (NamingException e) { throw e; } catch (Exception e) { NamingException e2 = new NamingException( "problem generating object using object factory"); e2.setRootCause(e); throw e2; } } answer = new SearchResult(next.getName(), next.getClassName(), obj, SearchFilter.selectAttributes(targetAttrs, cons.getReturningAttributes()), true); if (!remove) nextMatch = answer; return answer; } } } return null; } } }
⏎ com/sun/jndi/toolkit/dir/LazySearchEnumerationImpl.java
Or download all of them as a single archive file:
File name: java.naming-11.0.1-src.zip File size: 461792 bytes Release date: 2018-11-04 Download
⇒ JDK 11 java.net.http.jmod - Net HTTP Module
2020-09-30, 52574👍, 0💬
Popular Posts:
JDK 11 jdk.localedata.jmod is the JMOD file for JDK 11 Localedata module. JDK 11 Locale Data module ...
How to download and install JDK (Java Development Kit) 1.4? If you want to write Java applications, ...
JDK 11 java.xml.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) module. JDK 11 XML...
JDK 11 java.management.jmod is the JMOD file for JDK 11 Management module. JDK 11 Management module ...
JDK 11 jdk.internal.vm.ci.jmod is the JMOD file for JDK 11 Internal VM CI module. JDK 11 Internal VM...