在Java中使用符号引用 [英] Usage of symbolic references in Java

查看:165
本文介绍了在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中使用符号引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆