| 132 | } |
| 133 | |
| 134 | public static @NotNull String getStableName(@NotNull Class<?> cls) { |
| 135 | // 支持的 Zeze/Gen/Types/ 类型。 |
| 136 | var name = stableNameMap.get(cls); |
| 137 | if (name != null) |
| 138 | return name; |
| 139 | if (Serializable.class.isAssignableFrom(cls)) |
| 140 | return cls.getName(); |
| 141 | throw new UnsupportedOperationException("Unsupported type: " + cls.getName()); |
| 142 | } |
| 143 | |
| 144 | public static @NotNull String getStableName(@NotNull Class<?> cls, @NotNull Class<?> tplCls) { |
| 145 | return cls.getName() + '<' + getStableName(tplCls) + '>'; |