Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
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 (322)
Collections:
Other Resources:
JDK 17 java.naming.jmod - Naming Module
JDK 17 java.naming.jmod is the JMOD file for JDK 17 Naming module.
JDK 17 Naming module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\java.naming.jmod.
JDK 17 Naming module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Naming module source code files are stored in \fyicenter\jdk-17.0.5\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/ldap/NotifierArgs.java
/*
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.jndi.ldap;
import javax.naming.directory.SearchControls;
import javax.naming.event.*;
/**
* This class holds the information in an event registration/deregistration
* request. This includes the name, filter, search controls and
* the different interfaces that the listener implements. This last piece
* of information determines which event(s) the listener is interested in.
*<p>
* It overrides equals() and hashCode() to use all these pieces of
* information so that it can be used correctly in a hashtable.
*
* @author Rosanna Lee
*/
final class NotifierArgs {
static final int ADDED_MASK = 0x1;
static final int REMOVED_MASK = 0x2;
static final int CHANGED_MASK = 0x4;
static final int RENAMED_MASK = 0x8;
// these fields are package private; used by NamingEventNotifier
String name;
String filter;
SearchControls controls;
int mask;
// package private
NotifierArgs(String name, int scope, NamingListener l) {
this(name, "(objectclass=*)", null, l);
// if scope is not default, create search ctl and set it
if (scope != EventContext.ONELEVEL_SCOPE) {
controls = new SearchControls();
controls.setSearchScope(scope);
}
}
// package private
NotifierArgs(String name, String filter, SearchControls ctls,
NamingListener l) {
this.name = name;
this.filter = filter;
this.controls = ctls;
if (l instanceof NamespaceChangeListener) {
mask |= ADDED_MASK|REMOVED_MASK|RENAMED_MASK;
}
if (l instanceof ObjectChangeListener) {
mask |= CHANGED_MASK;
}
}
// checks name, filter, controls
public boolean equals(Object obj) {
if (obj instanceof NotifierArgs) {
NotifierArgs target = (NotifierArgs)obj;
return mask == target.mask &&
name.equals(target.name) && filter.equals(target.filter) &&
checkControls(target.controls);
}
return false;
}
private boolean checkControls(SearchControls ctls) {
if ((controls == null || ctls == null)) {
return ctls == controls;
}
// ctls are nonempty
return (controls.getSearchScope() == ctls.getSearchScope()) &&
(controls.getTimeLimit() == ctls.getTimeLimit()) &&
(controls.getDerefLinkFlag() == ctls.getDerefLinkFlag()) &&
(controls.getReturningObjFlag() == ctls.getReturningObjFlag()) &&
(controls.getCountLimit() == ctls.getCountLimit()) &&
checkStringArrays(controls.getReturningAttributes(),
ctls.getReturningAttributes());
}
private static boolean checkStringArrays(String[] s1, String[] s2) {
if ((s1 == null) || (s2 == null)) {
return s1 == s2;
}
// both are nonnull
if (s1.length != s2.length) {
return false;
}
for (int i = 0; i < s1.length; i++) {
if (!s1[i].equals(s2[i])) {
return false;
}
}
return true;
}
// save from having to recalculate each time
private int sum = -1;
public int hashCode() {
if (sum == -1)
sum = mask + name.hashCode() + filter.hashCode() + controlsCode();
return sum;
}
// used in calculating hash code
private int controlsCode() {
if (controls == null) return 0;
int total = controls.getTimeLimit() + (int)controls.getCountLimit() +
(controls.getDerefLinkFlag() ? 1 : 0) +
(controls.getReturningObjFlag() ? 1 : 0);
String[] attrs = controls.getReturningAttributes();
if (attrs != null) {
for (int i = 0; i < attrs.length; i++) {
total += attrs[i].hashCode();
}
}
return total;
}
}
⏎ com/sun/jndi/ldap/NotifierArgs.java
Or download all of them as a single archive file:
File name: java.naming-17.0.5-src.zip File size: 490626 bytes Release date: 2022-09-13 Download
⇒ JDK 17 java.net.http.jmod - Net HTTP Module
2023-09-23, ≈60🔥, 0💬
Popular Posts:
JDK 11 java.desktop.jmod is the JMOD file for JDK 11 Desktop module. JDK 11 Desktop module compiled ...
JDK 11 java.sql.rowset.jmod is the JMOD file for JDK 11 SQL Rowset module. JDK 11 SQL Rowset module ...
JDK 17 java.sql.rowset.jmod is the JMOD file for JDK 17 SQL Rowset module. JDK 17 SQL Rowset module ...
How to download and install ojdbc11.jar for Oracle 21c? ojdbc11.jar for Oracle 21c is a Java JDBC Dr...
Java Architecture for XML Binding (JAXB) is a Java API that allows Java developers to map Java class...