Home / Class/ NetUtilLocalhostAccessor Class — netty Architecture

NetUtilLocalhostAccessor Class — netty Architecture

Architecture documentation for the NetUtilLocalhostAccessor class in NetUtilSubstitutions.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  0160c31e_53a9_e959_6837_2c3deaa17da1["NetUtilLocalhostAccessor"]
  57f5862a_d0d4_2cbc_571e_8864156d87d0["NetUtilSubstitutions.java"]
  0160c31e_53a9_e959_6837_2c3deaa17da1 -->|defined in| 57f5862a_d0d4_2cbc_571e_8864156d87d0
  d3a3d6ba_41e0_904f_f46f_24539819b279["InetAddress()"]
  0160c31e_53a9_e959_6837_2c3deaa17da1 -->|method| d3a3d6ba_41e0_904f_f46f_24539819b279
  f215882e_66e5_1d83_779e_fd0959a3bc14["set()"]
  0160c31e_53a9_e959_6837_2c3deaa17da1 -->|method| f215882e_66e5_1d83_779e_fd0959a3bc14

Relationship Graph

Source Code

common/src/main/java/io/netty/util/NetUtilSubstitutions.java lines 79–88

    private static final class NetUtilLocalhostAccessor {
        static InetAddress get() {
            // using https://en.wikipedia.org/wiki/Initialization-on-demand_holder_idiom
            return NetUtilLocalhostLazyHolder.LOCALHOST;
        }

        static void set(InetAddress ignored) {
            // a no-op setter to avoid exceptions when NetUtil is initialized at run-time
        }
    }

Frequently Asked Questions

What is the NetUtilLocalhostAccessor class?
NetUtilLocalhostAccessor is a class in the netty codebase, defined in common/src/main/java/io/netty/util/NetUtilSubstitutions.java.
Where is NetUtilLocalhostAccessor defined?
NetUtilLocalhostAccessor is defined in common/src/main/java/io/netty/util/NetUtilSubstitutions.java at line 79.

Analyze Your Own Codebase

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

Try Supermodel Free