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 jdk.incubator.foreign.jmod - JDK Incubator Foreign
JDK 17 jdk.incubator.foreign.jmod is the JMOD file for JDK 17 HTTP Server module.
JDK 17 Incubator Foreign module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.incubator.foreign.jmod.
JDK 17 Incubator Foreign module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Incubator Foreign module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.incubator.foreign.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/internal/foreign/MemoryAddressImpl.java
/* * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * * */ package jdk.internal.foreign; import jdk.incubator.foreign.MemoryAddress; import jdk.incubator.foreign.MemorySegment; import jdk.internal.reflect.CallerSensitive; import jdk.internal.reflect.Reflection; import jdk.incubator.foreign.ResourceScope; import java.util.Objects; /** * This class provides an immutable implementation for the {@code MemoryAddress} interface. This class contains information * about the segment this address is associated with, as well as an offset into such segment. */ public final class MemoryAddressImpl implements MemoryAddress { private final AbstractMemorySegmentImpl segment; private final long offset; public MemoryAddressImpl(AbstractMemorySegmentImpl segment, long offset) { this.segment = segment; this.offset = offset; } Object base() { return segment != null ? segment.base() : null; } long offset() { return segment != null ? segment.min() + offset : offset; } // MemoryAddress methods @Override public ResourceScope scope() { return segment != null ? segment.scope() : ResourceScope.globalScope(); } @Override public MemoryAddress addOffset(long offset) { return new MemoryAddressImpl(segment, this.offset + offset); } @Override public long segmentOffset(MemorySegment segment) { Objects.requireNonNull(segment); AbstractMemorySegmentImpl segmentImpl = (AbstractMemorySegmentImpl)segment; if (segmentImpl.base() != base()) { throw new IllegalArgumentException("Incompatible segment: " + segment); } return offset() - segmentImpl.min(); } @Override public boolean isNative() { return base() == null; } @Override public long toRawLongValue() { if (segment != null) { if (segment.base() != null) { throw new UnsupportedOperationException("Not a native address"); } segment.checkValidState(); } return offset(); } // Object methods @Override public int hashCode() { return Objects.hash(base(), offset()); } @Override public boolean equals(Object that) { if (that instanceof MemoryAddressImpl) { MemoryAddressImpl addr = (MemoryAddressImpl)that; return Objects.equals(base(), addr.base()) && offset() == addr.offset(); } else { return false; } } @Override public String toString() { return "MemoryAddress{ base: " + base() + " offset=0x" + Long.toHexString(offset()) + " }"; } @Override @CallerSensitive public final MemorySegment asSegment(long bytesSize, ResourceScope scope) { Reflection.ensureNativeAccess(Reflection.getCallerClass()); return asSegment(bytesSize, null, scope); } @Override @CallerSensitive public final MemorySegment asSegment(long bytesSize, Runnable cleanupAction, ResourceScope scope) { Reflection.ensureNativeAccess(Reflection.getCallerClass()); Objects.requireNonNull(scope); if (bytesSize <= 0) { throw new IllegalArgumentException("Invalid size : " + bytesSize); } return NativeMemorySegmentImpl.makeNativeSegmentUnchecked(this, bytesSize, cleanupAction, (ResourceScopeImpl) scope); } public static MemorySegment ofLongUnchecked(long value) { return ofLongUnchecked(value, Long.MAX_VALUE); } public static MemorySegment ofLongUnchecked(long value, long byteSize, ResourceScopeImpl resourceScope) { return NativeMemorySegmentImpl.makeNativeSegmentUnchecked(MemoryAddress.ofLong(value), byteSize, null, resourceScope); } public static MemorySegment ofLongUnchecked(long value, long byteSize) { return NativeMemorySegmentImpl.makeNativeSegmentUnchecked(MemoryAddress.ofLong(value), byteSize, null, ResourceScopeImpl.GLOBAL); } }
⏎ jdk/internal/foreign/MemoryAddressImpl.java
Or download all of them as a single archive file:
File name: jdk.incubator.foreign-17.0.5-src.zip File size: 168767 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.incubator.vector.jmod - JDK Incubator Vector
2023-10-04, 5905👍, 0💬
Popular Posts:
How to perform XML Schema validation with dom\Writer.java provided in the Apache Xerces package? You...
JDK 17 java.desktop.jmod is the JMOD file for JDK 17 Desktop module. JDK 17 Desktop module compiled ...
The JMX technology provides the tools for building distributed, Web-based, modular and dynamic solut...
Apache Axis2 is the core engine for Web services. It is a complete re-design and re-write of the wid...
Apache ZooKeeper is an open-source server which enables highly reliable distributed coordination. Ap...