langtools/src/share/classes/com/sun/tools/javadoc/TypeVariableImpl.java
changeset 1260 a772ba9ba43d
parent 10 06bc494ca11e
child 1264 076a3cde30d5
equal deleted inserted replaced
1259:61142e0aeb3f 1260:a772ba9ba43d
    34 import com.sun.tools.javac.code.Symbol.MethodSymbol;
    34 import com.sun.tools.javac.code.Symbol.MethodSymbol;
    35 import com.sun.tools.javac.code.Type;
    35 import com.sun.tools.javac.code.Type;
    36 import com.sun.tools.javac.code.Type.TypeVar;
    36 import com.sun.tools.javac.code.Type.TypeVar;
    37 import com.sun.tools.javac.util.List;
    37 import com.sun.tools.javac.util.List;
    38 import com.sun.tools.javac.util.Name;
    38 import com.sun.tools.javac.util.Name;
       
    39 import com.sun.tools.javac.util.Names;
    39 
    40 
    40 /**
    41 /**
    41  * Implementation of <code>TypeVariable</code>, which
    42  * Implementation of <code>TypeVariable</code>, which
    42  * represents a type variable.
    43  * represents a type variable.
    43  *
    44  *
    64     public ProgramElementDoc owner() {
    65     public ProgramElementDoc owner() {
    65         Symbol osym = type.tsym.owner;
    66         Symbol osym = type.tsym.owner;
    66         if ((osym.kind & Kinds.TYP) != 0) {
    67         if ((osym.kind & Kinds.TYP) != 0) {
    67             return env.getClassDoc((ClassSymbol)osym);
    68             return env.getClassDoc((ClassSymbol)osym);
    68         }
    69         }
    69         Name.Table names = osym.name.table;
    70         Names names = osym.name.table.names;
    70         if (osym.name == names.init) {
    71         if (osym.name == names.init) {
    71             return env.getConstructorDoc((MethodSymbol)osym);
    72             return env.getConstructorDoc((MethodSymbol)osym);
    72         } else {
    73         } else {
    73             return env.getMethodDoc((MethodSymbol)osym);
    74             return env.getMethodDoc((MethodSymbol)osym);
    74         }
    75         }
   111     /**
   112     /**
   112      * Get the bounds of a type variable as listed in the "extends" clause.
   113      * Get the bounds of a type variable as listed in the "extends" clause.
   113      */
   114      */
   114     private static List<Type> getBounds(TypeVar v, DocEnv env) {
   115     private static List<Type> getBounds(TypeVar v, DocEnv env) {
   115         Name boundname = v.getUpperBound().tsym.getQualifiedName();
   116         Name boundname = v.getUpperBound().tsym.getQualifiedName();
   116         if (boundname == boundname.table.java_lang_Object) {
   117         if (boundname == boundname.table.names.java_lang_Object) {
   117             return List.nil();
   118             return List.nil();
   118         } else {
   119         } else {
   119             return env.types.getBounds(v);
   120             return env.types.getBounds(v);
   120         }
   121         }
   121     }
   122     }