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/decoder/FieldElementHandler.java
/* * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.beans.decoder; import com.sun.beans.finder.FieldFinder; import java.lang.reflect.Field; /** * This class is intended to handle <field> element. * This element simplifies access to the fields. * If the {@code class} attribute is specified * this element accesses static field of specified class. * This element defines getter if it contains no argument. * It returns the value of the field in this case. * For example:<pre> * <field name="TYPE" class="java.lang.Long"/></pre> * is equivalent to {@code Long.TYPE} in Java code. * This element defines setter if it contains one argument. * It does not return the value of the field in this case. * For example:<pre> * <field name="id"><int>0</int></field></pre> * is equivalent to {@code id = 0} in Java code. * <p>The following attributes are supported: * <dl> * <dt>name * <dd>the field name * <dt>class * <dd>the type is used for static fields only * <dt>id * <dd>the identifier of the variable that is intended to store the result * </dl> * * @since 1.7 * * @author Sergey A. Malenkov */ final class FieldElementHandler extends AccessorElementHandler { private Class<?> type; /** * Parses attributes of the element. * The following attributes are supported: * <dl> * <dt>name * <dd>the field name * <dt>class * <dd>the type is used for static fields only * <dt>id * <dd>the identifier of the variable that is intended to store the result * </dl> * * @param name the attribute name * @param value the attribute value */ @Override public void addAttribute(String name, String value) { if (name.equals("class")) { // NON-NLS: the attribute name this.type = getOwner().findClass(value); } else { super.addAttribute(name, value); } } /** * Tests whether the value of this element can be used * as an argument of the element that contained in this one. * * @return {@code true} if the value of this element should be used * as an argument of the element that contained in this one, * {@code false} otherwise */ @Override protected boolean isArgument() { return super.isArgument() && (this.type != null); // only static accessor can be used an argument } /** * Returns the context of the field. * The context of the static field is the class object. * The context of the non-static field is the value of the parent element. * * @return the context of the field */ @Override protected Object getContextBean() { return (this.type != null) ? this.type : super.getContextBean(); } /** * Returns the value of the field with specified {@code name}. * * @param name the name of the field * @return the value of the specified field */ @Override protected Object getValue(String name) { try { return getFieldValue(getContextBean(), name); } catch (Exception exception) { getOwner().handleException(exception); } return null; } /** * Sets the new value for the field with specified {@code name}. * * @param name the name of the field * @param value the new value for the specified field */ @Override protected void setValue(String name, Object value) { try { setFieldValue(getContextBean(), name, value); } catch (Exception exception) { getOwner().handleException(exception); } } /** * Performs the search of the field with specified {@code name} * in specified context and returns its value. * * @param bean the context bean that contains field * @param name the name of the field * @return the value of the field * @throws IllegalAccessException if the field is not accesible * @throws NoSuchFieldException if the field is not found */ static Object getFieldValue(Object bean, String name) throws IllegalAccessException, NoSuchFieldException { return findField(bean, name).get(bean); } /** * Performs the search of the field with specified {@code name} * in specified context and updates its value. * * @param bean the context bean that contains field * @param name the name of the field * @param value the new value for the field * @throws IllegalAccessException if the field is not accesible * @throws NoSuchFieldException if the field is not found */ private static void setFieldValue(Object bean, String name, Object value) throws IllegalAccessException, NoSuchFieldException { findField(bean, name).set(bean, value); } /** * Performs the search of the field * with specified {@code name} in specified context. * * @param bean the context bean that contains field * @param name the name of the field * @return field object that represents found field * @throws NoSuchFieldException if the field is not found */ private static Field findField(Object bean, String name) throws NoSuchFieldException { return (bean instanceof Class<?>) ? FieldFinder.findStaticField((Class<?>) bean, name) : FieldFinder.findField(bean.getClass(), name); } }
⏎ com/sun/beans/decoder/FieldElementHandler.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, 66491👍, 0💬
Popular Posts:
xml-commons Resolver Source Code Files are provided in the source package file, xml-commons-resolver...
What Is jms.jar? I heard it's related to JMS (Java Message Service) 1.1? The if you have an jms.jar ...
Apache Axis2 is the core engine for Web services. It is a complete re-design and re-write of the wid...
Commons VFS provides a single API for accessing various different file systems. It presents a unifor...
How to display XML element type information with the jaxp\TypeInfoWriter.java provided in the Apache...