Lines Matching defs:out

42 static void out(char* s) {
64 out("// AUTOMATICALLY GENERATED FILE - DO NOT EDIT ");
65 out("package sun.nio.ch; ");
66 out("import java.net.SocketOption; ");
67 out("import java.net.StandardSocketOptions; ");
68 out("import java.net.ProtocolFamily; ");
69 out("import java.net.StandardProtocolFamily; ");
70 out("import java.util.Map; ");
71 out("import java.util.HashMap; ");
72 out("class SocketOptionRegistry { ");
73 out(" private SocketOptionRegistry() { } ");
74 out(" private static class RegistryKey { ");
75 out(" private final SocketOption<?> name; ");
76 out(" private final ProtocolFamily family; ");
77 out(" RegistryKey(SocketOption<?> name, ProtocolFamily family) { ");
78 out(" this.name = name; ");
79 out(" this.family = family; ");
80 out(" } ");
81 out(" public int hashCode() { ");
82 out(" return name.hashCode() + family.hashCode(); ");
83 out(" } ");
84 out(" public boolean equals(Object ob) { ");
85 out(" if (ob == null) return false; ");
86 out(" if (!(ob instanceof RegistryKey)) return false; ");
87 out(" RegistryKey other = (RegistryKey)ob; ");
88 out(" if (this.name != other.name) return false; ");
89 out(" if (this.family != other.family) return false; ");
90 out(" return true; ");
91 out(" } ");
92 out(" } ");
93 out(" private static class LazyInitialization { ");
94 out(" static final Map<RegistryKey,OptionKey> options = options(); ");
95 out(" private static Map<RegistryKey,OptionKey> options() { ");
96 out(" Map<RegistryKey,OptionKey> map = ");
97 out(" new HashMap<RegistryKey,OptionKey>(); ");
120 out(" return map; ");
121 out(" } ");
122 out(" } ");
123 out(" public static OptionKey findOption(SocketOption<?> name, ProtocolFamily family) { ");
124 out(" RegistryKey key = new RegistryKey(name, family); ");
125 out(" return LazyInitialization.options.get(key); ");
126 out(" } ");
127 out("} ");