MCPcopy Create free account
hub / github.com/e2wugui/zeze / main

Method main

ZezeJava/ZezeJavaTest/src/Temp/DemoMain.java:57–126  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

55 }
56
57 public static void main(String[] args) throws Exception {
58 System.out.println(Bean.hash64("UnitTest.Zeze.Component.TestBean"));
59 if (args.length == 0)
60 return;
61 System.out.println(AutoKey.getServerIdFromId(2167583089L));
62 System.out.println(AutoKey.getServerIdFromId(6195073));
63
64 Task.tryInitThreadPool();
65 var futures = new ArrayList<Future<?>>(100);
66 var seed = System.currentTimeMillis();
67 for (int i = 0; i < 100; i += 3) {
68 var s = seed++;
69 var seed2 = s ^ i;
70 futures.add(Task.runUnsafe(() -> {
71 var r = StableRandom.local();
72 r.setSeed(seed2);
73 System.out.println(r.nextLong(65536));
74 }, "runUnsafe"));
75 }
76 for (var future : futures)
77 future.get();
78 if (args.length == 0)
79 return;
80 /*
81
82 var lq = new ConcurrentLinkedQueue<Integer>();
83 lq.add(1);
84 lq.add(2);
85 lq.add(3);
86 for (var e : lq) {
87 System.out.println(e);
88 lq.poll();
89 }
90 if (args.length == 0)
91 return;
92 */
93 //noinspection RedundantCast
94 logger.log(Level.WARN, "n={}, s={}, p={}", 123, "abc", args, (Exception)null);
95 System.out.println("中文");
96 System.out.println(System.getProperty("user.name"));
97 System.out.println(InetAddress.getLocalHost().getHostName());
98 logger.info("中文");
99 logger.info(System.getProperty("user.name"));
100 var a = new File("a/b");
101 var b = new File("a/../a/b");
102 var c = new File("D:\\zeze\\ZezeJava\\a\\b");
103 System.out.println(a.getPath()); // a\b
104 System.out.println(b.getPath()); // a\..\a\b
105 System.out.println(c.getPath()); // D:\zeze\ZezeJava\a\b
106
107 System.out.println(a.getAbsolutePath()); // D:\zeze\ZezeJava\a\b
108 System.out.println(b.getAbsolutePath()); // D:\zeze\ZezeJava\a\..\a\b
109 System.out.println(c.getAbsolutePath()); // D:\zeze\ZezeJava\a\b
110
111 System.out.println(b.getCanonicalPath()); // D:\zeze\ZezeJava\a\b
112 System.out.println(b.getCanonicalFile().getPath()); // D:\zeze\ZezeJava\a\b
113
114 System.out.println(a.hashCode()); // 1286710

Callers

nothing calls this directly

Calls 13

hash64Method · 0.95
getServerIdFromIdMethod · 0.95
tryInitThreadPoolMethod · 0.95
runUnsafeMethod · 0.95
localMethod · 0.95
getPropertyMethod · 0.80
getCanonicalFileMethod · 0.80
addMethod · 0.65
getMethod · 0.65
hashCodeMethod · 0.65
setSeedMethod · 0.45
nextLongMethod · 0.45

Tested by

no test coverage detected