本文介绍了在Java中使用符号引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好。 我想问一下Java中的符号引用。它们用于什么? 我唯一知道的就是它们与常量池和 ldc 指令有关。 有人有过这方面的经验吗?有没有办法如何在Java语言中演示它们的用法?
Hi all. I would like to ask on symbolic references in Java. What are they used for? The only thing I know about them is that they have something to do with constant pool and ldc instruction. Has anybody some experience with them? Is there any way how to demonstrate their usage in Java language?
推荐答案java中的符号引用用于以大致相同的方式定位jar文件中的代码或数据链接器在几乎所有其他语言中找到目标文件/ lib文件中的符号。 jar文件中的类定义由符号引用指向的数据和指令组成。在类加载和执行过程中使用此信息。 Symbolic references in java are used for locating code or data in a jar file in much the same way that the linker finds symbols in an object file/lib file in just about every other language. A class definition in a jar file consists of data and instructions that are pointed at by symbolic references. This info is used during the class load and execution process.
更多推荐
在Java中使用符号引用
发布评论