You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							29 lines
						
					
					
						
							613 B
						
					
					
				
			
		
		
	
	
							29 lines
						
					
					
						
							613 B
						
					
					
				---
 | 
						|
属性介绍
 | 
						|
---
 | 
						|
 | 
						|
#### 目录
 | 
						|
 | 
						|
1. 属性概述
 | 
						|
2. Code 属性
 | 
						|
3. LineNumberTable 属性
 | 
						|
4. LocalVariableTable 属性
 | 
						|
 | 
						|
#### 属性概述
 | 
						|
 | 
						|
属性是 Class 文件的重要组成部分。和常量池类似,属性也分为很多类型,在 Java 虚拟机规范中,属性可用 attribute_info 数据结构伪代码表示:
 | 
						|
 | 
						|
```
 | 
						|
attribute_info{
 | 
						|
 | 
						|
    //属性名称,指向常量池中 Utf8 常量项的索引
 | 
						|
    u2  attribute_name_index;
 | 
						|
    
 | 
						|
    //该属性具体内容的长度,即下面 info 数组的长度
 | 
						|
    u4  attribute_length;
 | 
						|
    
 | 
						|
    //属性具体内容
 | 
						|
    u1  info[attribute_length];
 | 
						|
}
 | 
						|
```
 | 
						|
 | 
						|
 |