首页> 外国专利> Method and system for determining the defining classLoader of a Java class as it is being defined

Method and system for determining the defining classLoader of a Java class as it is being defined

机译:确定正在定义的Java类的定义classLoader的方法和系统

摘要

A technique is presented for determining the defining ClassLoader class of a Java class as it is being defined within a Java Virtual Machine (JVM) by instrumenting the “java.lang.ClassLoader” class. Within a JVM, all ClassLoader instances call one of the “defineClass” methods of class “java.lang.ClassLoader” in order to pass the raw bytes for loaded a class to the JVM to have it defined as a Java class. Therefore, instrumentation code is inserted into the “defineClass” methods of class “java.lang.ClassLoader”; the instrumentation code stores an identity of the defining ClassLoader prior to the invocation of the class load hook by the JVM, which can use the identity of the defining ClassLoader for various purposes.
机译:提出了一种通过检测“ java.lang.ClassLoader”来确定在Java虚拟机(JVM)中正在定义的Java类的定义ClassLoader类的技术。类。在JVM中,所有ClassLoader实例都调用“ defineClass”之一。类“ java.lang.ClassLoader”的方法为了将用于加载类的原始字节传递给JVM,以将其定义为Java类。因此,将检测代码插入到“ defineClass”中。类“ java.lang.ClassLoader”的方法在JVM调用类装入钩子之前,检测代码存储定义的ClassLoader的标识,该标识可以出于各种目的使用定义的ClassLoader的标识。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号