Home / File/ PlatformDependent0.java — netty Source File

PlatformDependent0.java — netty Source File

Architecture documentation for PlatformDependent0.java, a java file in the netty codebase.

Entity Profile

Relationship Graph

Source Code

/*
 * Copyright 2013 The Netty Project
 *
 * The Netty Project licenses this file to you under the Apache License,
 * version 2.0 (the "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at:
 *
 *   https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */
package io.netty.util.internal;

import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;
import sun.misc.Unsafe;

import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.concurrent.atomic.AtomicLong;

import static java.lang.invoke.MethodType.methodType;

/**
 * The {@link PlatformDependent} operations which requires access to {@code sun.misc.*}.
 */
final class PlatformDependent0 {

    private static final InternalLogger logger = InternalLoggerFactory.getInstance(PlatformDependent0.class);
    private static final long ADDRESS_FIELD_OFFSET;
    private static final long BYTE_ARRAY_BASE_OFFSET;
    private static final long INT_ARRAY_BASE_OFFSET;
    private static final long INT_ARRAY_INDEX_SCALE;
    private static final long LONG_ARRAY_BASE_OFFSET;
    private static final long LONG_ARRAY_INDEX_SCALE;
    private static final MethodHandle DIRECT_BUFFER_CONSTRUCTOR;
    private static final MethodHandle ALLOCATE_ARRAY_METHOD;
    private static final MethodHandle ALIGN_SLICE;
    private static final MethodHandle OFFSET_SLICE;
    private static final MethodHandle ABSOLUTE_PUT_BUFFER;
    private static final MethodHandle ABSOLUTE_PUT_ARRAY;
    private static final boolean IS_ANDROID = isAndroid0();
    private static final int JAVA_VERSION = javaVersion0();
    private static final Throwable EXPLICIT_NO_UNSAFE_CAUSE = explicitNoUnsafeCause0();

    private static final Throwable UNSAFE_UNAVAILABILITY_CAUSE;

// ... (1139 more lines)

Domain

Subdomains

Frequently Asked Questions

What does PlatformDependent0.java do?
PlatformDependent0.java is a source file in the netty codebase, written in java. It belongs to the CommonUtil domain, Internal subdomain.
Where is PlatformDependent0.java in the architecture?
PlatformDependent0.java is located at common/src/main/java/io/netty/util/internal/PlatformDependent0.java (domain: CommonUtil, subdomain: Internal, directory: common/src/main/java/io/netty/util/internal).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free