Home / Class/ NetUtilLocalhost4Accessor Class — netty Architecture

NetUtilLocalhost4Accessor Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  5b7d4830_6732_58be_6a59_122eff3eeb06["NetUtilLocalhost4Accessor"]
  57f5862a_d0d4_2cbc_571e_8864156d87d0["NetUtilSubstitutions.java"]
  5b7d4830_6732_58be_6a59_122eff3eeb06 -->|defined in| 57f5862a_d0d4_2cbc_571e_8864156d87d0
  c7ce719b_a787_f1ae_650d_f1c552c43a35["Inet4Address()"]
  5b7d4830_6732_58be_6a59_122eff3eeb06 -->|method| c7ce719b_a787_f1ae_650d_f1c552c43a35
  c3e702a7_a84e_d95f_f00d_0fd95479d16b["set()"]
  5b7d4830_6732_58be_6a59_122eff3eeb06 -->|method| c3e702a7_a84e_d95f_f00d_0fd95479d16b

Relationship Graph

Source Code

common/src/main/java/io/netty/util/NetUtilSubstitutions.java lines 49–58

    private static final class NetUtilLocalhost4Accessor {
        static Inet4Address get() {
            // using https://en.wikipedia.org/wiki/Initialization-on-demand_holder_idiom
            return NetUtilLocalhost4LazyHolder.LOCALHOST4;
        }

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

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free