码迷,mamicode.com
首页 > 其他好文 > 详细

关于符号Symbol2

时间:2017-02-09 21:46:45      阅读:128      评论:0      收藏:0      [点我收藏+]

标签:表示   art   where   ext   att   成员   类成员   highlight   nts   

 

来看一下继承自Symbol的具体实现类。

1、TypeSymbol

/** A class for type symbols.
 * Type variables are represented by instances of this class,  // 类型变量用这个类来表示
 * classes and packages by instances of subclasses.  // 类和包用子类来表示
 */
public class TypeSymbol extends Symbol implements TypeParameterElement {
   ...
}

 

  

2、PackageSymbol

 

/** A class for package symbols
 */
public class PackageSymbol extends TypeSymbol  implements PackageElement {

    public Scope members_field;
    public Name fullname;
    public ClassSymbol package_info; // see bug 6443073
    ...
}

主要有3个属性。  

 

3、ClassSymbol

/** A class for class symbols
 */
public class ClassSymbol extends TypeSymbol implements TypeElement {

    /** a scope for all class members; variables, methods and inner classes
     *  type parameters are not part of this scope
     *  
     *  所有类成员的一个作用域。变量,方法和内部类 类型参数不是这个作用域的一部分
     */
    public Scope members_field;

    /** the fully qualified name of the class, i.e. pck.outer.inner.
     *  null for anonymous classes
     *  
     *  类的全限定名,对于匿名类为空
     */
    public Name fullname;

    /** the fully qualified name of the class after converting to flat
     *  representation, i.e. pck.outer$inner,
     *  set externally for local and anonymous classes
     *  
     *  类的全限定名,为本地和匿名类也进行设置
     */
    public Name flatname;

    /** the sourcefile where the class came from
     */
    public JavaFileObject sourcefile;

    /** the classfile from where to load this class
     *  this will have extension .class or .java
     */
    public JavaFileObject classfile;

    /** the list of translated local classes (used for generating InnerClasses attribute)
     */
    public List<ClassSymbol> trans_local;

    /** the constant pool of the class
     */
    public Pool pool;
    ...
}

  

 

关于符号Symbol2

标签:表示   art   where   ext   att   成员   类成员   highlight   nts   

原文地址:http://www.cnblogs.com/extjs4/p/6383968.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!