分析org.rpgpoet.Music.wizards.length

 

例子如下:

package bazola;
public class Gabriel {
	static int n = org.rpgpoet.Music.wizards.length;
}

 

package org.rpgpoet;
import java.util.Random;
public interface Music {
	Random[] wizards = new Random[4];
}

 

在分析整个JCVariableDecl这个语句时,这个语句声明了一个变量n,类型为int,

 

 

其中org.rpgpoet.Music.wizards.length表达式的语法树结构如下:

分析org.rpgpoet.Music.wizards.length_第1张图片

 

 

通过Attr.visitSelect()方法后变为

org.rpgpoet.Music.wizards.length
skind = VAL12 表示org.rpgpoet.Music.wizards 可能为 skind = VAL12 | TYP02


org.rpgpoet.Music.wizards
skind = VAL12 | TYP02 表示org.rpgpoet.Music 可能为 skind = VAL12 | TYP02 | PCK01


org.rpgpoet.Music
skind = VAL12 | TYP02 | PCK01 表示org.rpgpoet 可能为 skind = VAL12 | TYP02 | PCK01

org.rpgpoet
skind = VAL12 | TYP02 | PCK01 表示org 可能为 skind = VAL12 | TYP02 | PCK01

org
skind = VAL12 | TYP02 | PCK01

 

 

 

 

 

 

 

  

你可能感兴趣的:(分析org.rpgpoet.Music.wizards.length)