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 17 java.desktop.jmod - Desktop Module
JDK 17 java.desktop.jmod is the JMOD file for JDK 17 Desktop module.
JDK 17 Desktop module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\java.desktop.jmod.
JDK 17 Desktop module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Desktop module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\java.desktop.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/beans/introspect/PropertyInfo.java
/* * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.beans.introspect; import java.beans.BeanProperty; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Collections; import java.util.EnumMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.TreeMap; import static com.sun.beans.finder.ClassFinder.findClass; public final class PropertyInfo { public enum Name { bound, expert, hidden, preferred, required, visualUpdate, description, enumerationValues } private static final String VETO_EXCEPTION_NAME = "java.beans.PropertyVetoException"; private static final Class<?> VETO_EXCEPTION; static { Class<?> type; try { type = Class.forName(VETO_EXCEPTION_NAME); } catch (Exception exception) { type = null; } VETO_EXCEPTION = type; } private Class<?> type; private MethodInfo read; private MethodInfo write; private PropertyInfo indexed; private List<MethodInfo> readList; private List<MethodInfo> writeList; private Map<Name,Object> map; private PropertyInfo() { } private boolean initialize() { boolean isInitedToIsGetter = false; if (this.read != null) { this.type = this.read.type; isInitedToIsGetter = isPrefix(this.read.method.getName(), "is"); } if (!isInitedToIsGetter && this.readList != null) { for (MethodInfo info : this.readList) { if ((this.read == null) || this.read.type.isAssignableFrom(info.type)) { this.read = info; this.type = info.type; } } this.readList = null; } Class<?> writeType = this.type; if (this.writeList != null) { for (MethodInfo info : this.writeList) { if (writeType == null) { this.write = info; writeType = info.type; } else if (writeType.isAssignableFrom(info.type)) { if ((this.write == null) || this.write.type.isAssignableFrom(info.type)) { this.write = info; writeType = info.type; } } } this.writeList = null; } if (this.type == null) { this.type = writeType; } if (this.indexed != null) { if ((this.type != null) && !this.type.isArray()) { this.indexed = null; // property type is not an array } else if (!this.indexed.initialize()) { this.indexed = null; // cannot initialize indexed methods } else if ((this.type != null) && (this.indexed.type != this.type.getComponentType())) { this.indexed = null; // different property types } else { this.map = this.indexed.map; this.indexed.map = null; } } if ((this.type == null) && (this.indexed == null)) { return false; } boolean done = initialize(this.read); if (!done) { initialize(this.write); } return true; } private boolean initialize(MethodInfo info) { if (info != null) { BeanProperty annotation = info.method.getAnnotation(BeanProperty.class); if (annotation != null) { if (!annotation.bound()) { put(Name.bound, Boolean.FALSE); } put(Name.expert, annotation.expert()); put(Name.required, annotation.required()); put(Name.hidden, annotation.hidden()); put(Name.preferred, annotation.preferred()); put(Name.visualUpdate, annotation.visualUpdate()); put(Name.description, annotation.description()); String[] values = annotation.enumerationValues(); try { Object[] array = new Object[3 * values.length]; int index = 0; for (String value : values) { Class<?> type = info.method.getDeclaringClass(); String name = value; int pos = value.lastIndexOf('.'); if (pos > 0) { name = value.substring(0, pos); if (name.indexOf('.') < 0) { String pkg = type.getName(); name = pkg.substring(0, 1 + Math.max( pkg.lastIndexOf('.'), pkg.lastIndexOf('$'))) + name; } type = findClass(name); name = value.substring(pos + 1); } Field field = type.getField(name); if (Modifier.isStatic(field.getModifiers()) && info.type.isAssignableFrom(field.getType())) { array[index++] = name; array[index++] = field.get(null); array[index++] = value; } } if (index == array.length) { put(Name.enumerationValues, array); } } catch (Exception ignored) { ignored.printStackTrace(); } return true; } } return false; } public Class<?> getPropertyType() { return this.type; } public Method getReadMethod() { return (this.read == null) ? null : this.read.method; } public Method getWriteMethod() { return (this.write == null) ? null : this.write.method; } public PropertyInfo getIndexed() { return this.indexed; } public boolean isConstrained() { if (this.write != null) { if (VETO_EXCEPTION == null) { for (Class<?> type : this.write.method.getExceptionTypes()) { if (type.getName().equals(VETO_EXCEPTION_NAME)) { return true; } } } else if (this.write.isThrow(VETO_EXCEPTION)) { return true; } } return (this.indexed != null) && this.indexed.isConstrained(); } public boolean is(Name name) { Object value = get(name); return (value instanceof Boolean) ? (Boolean) value : Name.bound.equals(name); } public Object get(Name name) { return this.map == null ? null : this.map.get(name); } private void put(Name name, boolean value) { if (value) { put(name, Boolean.TRUE); } } private void put(Name name, String value) { if (0 < value.length()) { put(name, (Object) value); } } private void put(Name name, Object value) { if (this.map == null) { this.map = new EnumMap<>(Name.class); } this.map.put(name, value); } private static List<MethodInfo> add(List<MethodInfo> list, Method method, Type type) { if (list == null) { list = new ArrayList<>(); } list.add(new MethodInfo(method, type)); return list; } private static boolean isPrefix(String name, String prefix) { return name.length() > prefix.length() && name.startsWith(prefix); } private static PropertyInfo getInfo(Map<String,PropertyInfo> map, String key, boolean indexed) { PropertyInfo info = map.get(key); if (info == null) { info = new PropertyInfo(); map.put(key, info); } if (!indexed) { return info; } if (info.indexed == null) { info.indexed = new PropertyInfo(); } return info.indexed; } public static Map<String,PropertyInfo> get(Class<?> type) { List<Method> methods = ClassInfo.get(type).getMethods(); if (methods.isEmpty()) { return Collections.emptyMap(); } Map<String,PropertyInfo> map = new TreeMap<>(); for (Method method : methods) { if (!Modifier.isStatic(method.getModifiers())) { Class<?> returnType = method.getReturnType(); String name = method.getName(); switch (method.getParameterCount()) { case 0: if (returnType.equals(boolean.class) && isPrefix(name, "is")) { PropertyInfo info = getInfo(map, name.substring(2), false); info.read = new MethodInfo(method, boolean.class); } else if (!returnType.equals(void.class) && isPrefix(name, "get")) { PropertyInfo info = getInfo(map, name.substring(3), false); info.readList = add(info.readList, method, method.getGenericReturnType()); } break; case 1: if (returnType.equals(void.class) && isPrefix(name, "set")) { PropertyInfo info = getInfo(map, name.substring(3), false); info.writeList = add(info.writeList, method, method.getGenericParameterTypes()[0]); } else if (!returnType.equals(void.class) && method.getParameterTypes()[0].equals(int.class) && isPrefix(name, "get")) { PropertyInfo info = getInfo(map, name.substring(3), true); info.readList = add(info.readList, method, method.getGenericReturnType()); } break; case 2: if (returnType.equals(void.class) && method.getParameterTypes()[0].equals(int.class) && isPrefix(name, "set")) { PropertyInfo info = getInfo(map, name.substring(3), true); info.writeList = add(info.writeList, method, method.getGenericParameterTypes()[1]); } break; } } } Iterator<PropertyInfo> iterator = map.values().iterator(); while (iterator.hasNext()) { if (!iterator.next().initialize()) { iterator.remove(); } } return !map.isEmpty() ? Collections.unmodifiableMap(map) : Collections.emptyMap(); } }
⏎ com/sun/beans/introspect/PropertyInfo.java
Or download all of them as a single archive file:
File name: java.desktop-17.0.5-src.zip File size: 9152233 bytes Release date: 2022-09-13 Download
⇒ JDK 17 java.instrument.jmod - Instrument Module
2023-09-16, 33197👍, 0💬
Popular Posts:
Old version of xml-apis.jar. JAR File Size and Download Location: File name: xmlParserAPIs.jar File ...
What is jxl.jar 2.6.12? jxl.jar 2.6.12 is the JAR file for Java Excel API 2.6.12, which is a Java li...
xml-commons External Source Code Files are provided in the source package file, xml-commons-external...
JDK 11 jdk.dynalink.jmod is the JMOD file for JDK 11 Dynamic Linking module. JDK 11 Dynamic Linking ...
ASM is an all purpose Java bytecode manipulation and analysis framework. It can be used to modify ex...