When you use generics, you supply that added information as part of the source code, and the compiler incorporates the added reference type information directly into your binary class files.
在使用泛型时,可以提供附加信息作为源代码的一部分,然后编译器会把附加的引用类型信息直接整合到二进制的类文件中。
It might be worth considering an enumeration here since it would remove the need for a reference type and store the value directly in the class.
这里,使用枚举可能值得考虑,因为它可以消除对引用类型的需要,并且将值直接存储到类中。
If you try to print or view a class file as text, you'll generally see many strings of this type, each a reference to some class.
如果您尝试将一个类文件作为文本输出或查看,那么通常会看到上述形式的多个字符串,每个字符串都是对某个类的引用。
应用推荐