本次大作业中

java程序——>二进制流(byte[ ]表示)——>ClassFile对象——>JClass

ClassFile的字段:magic,minorversion......,ConstantPool,accessFlag, short[ ] interfaces, FieldInfo[ ](字段信息表), MethodInfo[ ](方法信息表), AttributeInfo[ ](属性信息表)

JClass的字段:name,superclassname.....,RuntimeConstantPool,accessFlag, String[ ]interfacenames,Field[ ](字段表),Method[ ](方法表)

用ClassFile创建JClass时:ClassFile的ConstantPool——>创建JClass的RuntimeConstantPool

ClassFile的interfaces——>取名字创建JClass的interfacenames

ClassFile的FieldInfo[ ]——>创建JClass的Field[ ] (一个FieldInfo创建一个Field)

ClassFile的MethodInfo[ ]——>创建JClass的Method[ ](一个MethodInfo创建一个Method)

ConstantPool:常量池,存储着各种常量,这些常量都是符号引用,如下

ClassInfo,DoubleInfo,FieldInfo,FloatInfo,IntegerInfo,InterfaceMethodrefInfo,InvokeDynamicInfo,LongInfo,MemberInfo,MethodHandleInfo,MethodrefInfo,MethodTypeInfo,

NameAndTypeInfo,StringInfo,UTF8Inf

RuntimeConstantPool:运行时常量池,存储各种运行时常量,运行时常量是根据常量池中的常量创建而来,所以运行时常量与常量池中的常量一一对应,且这些运行时常量都是符号引用,如下

IntWrapper,FloatWrapper,LongWrapper,DoubleWrapper,StringWrapper,ClassRef,FieldRef,MethodRef,InterfaceMethodRef,NameAndType,UTF8

ClassFile与JClass的更多相关文章

  1. myEclipse中改了项目名,出现的问题 和 错误java.io.IOException: tmpFile.renameTo(classFile) failed

    今天遇到一个很头疼的问题,建的一个新项目,后来因为一些原因把项目名改了,之后就做了一些业务,但运行时总是没有反应,后来在myEclipse工作空间下的webapps文件中发现, 部署的文件名和项目名称 ...

  2. tmpFile.renameTo(classFile) failed 错误

    突然的出现了这个tmpFile.renameTo(classFile) failed 错误. 也许是我删掉了tomcat里面的webapps 中的项目,而通过debug部署,而出现了这个问题. 一开始 ...

  3. NDK(5) Android JNI官方综合教程[JavaVM and JNIEnv,Threads ,jclass, jmethodID, and jfieldID,UTF-8 and UTF-16 Strings,Exceptions,Native Libraries等等]

    JNI Tips In this document JavaVM and JNIEnv Threads jclass, jmethodID, and jfieldID Local and Global ...

  4. org.apache.tomcat.util.bcel.classfile.ClassFormatException: null is not a Java .class file

    org.apache.tomcat.util.bcel.classfile.ClassFormatException: null is not a Java .class file   在$TOMCA ...

  5. Eclipse之NDK编译-- Type 'jint' could not be resolved, and JNIEnv, jclass错误解决办法

    最近在研究面部识别美白相关的功能.使用的是opencv,就去研究了.今天正好有空就把安装了ndk,安装完成之后就试图去编译demo程序,hellow-jni c代码,一开始编辑就报错了3个错误信息: ...

  6. tmpFile.renameTo(classFile) failed解决

    完整异常: 严重: Servlet.service() for servlet [bjbr] in context with path [/HerPeisWechat] threw exception ...

  7. maven org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 60

      maven org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant poo ...

  8. Jni的Jclass JmethodID JfrieldID的差异

    Jni的Jclass JmethodID JfrieldID 这三者都是java类别的属性,本质上都是指标(Pointer).透过这些指标就能快速调用java类别的函数,或存取对象的属性值.在该类别被 ...

  9. jclass和jobject的迷惑

    [译]jclass和jobject 2012-09-18 15:02:58|  分类: Android |字号 订阅   jclass和jobject的迷惑第一次使用JNI,实例引用(jobject) ...

随机推荐

  1. Python常用标准库之datetime、random、hashlib、itertools

    库:具有相关功能模块的集合 import sys.builtin_module_names #返回内建模块的名字modules 查看所有可用模块的名字 1.1.1获取当前日期和时间 from date ...

  2. PHP cosh() 函数

    实例 返回不同数的双曲余弦: <?phpecho(cosh(3) . "<br>");echo(cosh(-3) . "<br>" ...

  3. 每日一道 LeetCode (3):回文数

    前文合集 每日一道 LeetCode 文章合集 题目:回文数 题目来源:https://leetcode-cn.com/problems/palindrome-number/ 判断一个整数是否是回文数 ...

  4. Python的基本运用(一)

    1.a**b  表示a的b次方. 2.def something(a,b):  定义函数,注意 python的缩进 . 3.print (a)与print a 的区别,python3中不支持print ...

  5. python6.2类的封装

    class Card(object): def __init__(self,num,pwd,ban): self.num=num#卡号 self.pwd=pwd#密码 self.__ban=ban#余 ...

  6. PhpStorm配置Apache与php的运行环境详细教程

    本文主要说明如何在phpstorm中配置已经安装好的PHP与apache.首先需要在本地安装php,这里我安装的是phpstudy 进入PHPstorm的界面点击file 下的settings 在La ...

  7. 比原Bapp红包应用

    喜迎国庆期间,比原链在自己的移动端钱包Bycoin(下载地址)和google插件钱byone中推出了红包应用,在国庆期间深受大家好评. 那我们今天就来大概介绍一下比原红包,以及基于比原链开发dapp应 ...

  8. one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [3, 1280, 28, 28]], which is output 0 of LeakyReluBackward1, is at version 2;

    RuntimeError: one of the variables needed for gradient computation has been modified by an inplace o ...

  9. 为什么我们需要Q#?

    原文地址:https://blogs.msdn.microsoft.com/visualstudio/2018/11/15/why-do-we-need-q/ 本文章为机器翻译. 你可能熟悉微软量子的 ...

  10. C#LeetCode刷题之#28-实现strStr()(Implement strStr())

    问题 该文章的最新版本已迁移至个人博客[比特飞],单击链接 https://www.byteflying.com/archives/3895 访问. 实现 strStr() 函数. 给定一个 hays ...