src/share/classes/com/sun/tools/apt/mirror/declaration/TypeParameterDeclarationImpl.java

Print this page




  23  * have any questions.
  24  */
  25 
  26 package com.sun.tools.apt.mirror.declaration;
  27 
  28 
  29 import java.util.Collection;
  30 import java.util.ArrayList;
  31 
  32 import com.sun.mirror.declaration.*;
  33 import com.sun.mirror.type.ReferenceType;
  34 import com.sun.mirror.util.DeclarationVisitor;
  35 import com.sun.tools.apt.mirror.AptEnv;
  36 import com.sun.tools.javac.code.*;
  37 import com.sun.tools.javac.code.Symbol.*;
  38 
  39 
  40 /**
  41  * Implementation of TypeParameterDeclaration
  42  */
  43 
  44 public class TypeParameterDeclarationImpl extends DeclarationImpl
  45                                           implements TypeParameterDeclaration
  46 {
  47     protected TypeSymbol sym;
  48 
  49 
  50     TypeParameterDeclarationImpl(AptEnv env, TypeSymbol sym) {
  51         super(env, sym);
  52         this.sym = sym;
  53     }
  54 
  55 
  56     /**
  57      * Returns the type parameter's name along with any "extends" clause.
  58      * Class names are qualified.  No implicit "extends Object" is added.
  59      */
  60     public String toString() {
  61         return toString(env, (Type.TypeVar) sym.type);
  62     }
  63 




  23  * have any questions.
  24  */
  25 
  26 package com.sun.tools.apt.mirror.declaration;
  27 
  28 
  29 import java.util.Collection;
  30 import java.util.ArrayList;
  31 
  32 import com.sun.mirror.declaration.*;
  33 import com.sun.mirror.type.ReferenceType;
  34 import com.sun.mirror.util.DeclarationVisitor;
  35 import com.sun.tools.apt.mirror.AptEnv;
  36 import com.sun.tools.javac.code.*;
  37 import com.sun.tools.javac.code.Symbol.*;
  38 
  39 
  40 /**
  41  * Implementation of TypeParameterDeclaration
  42  */
  43 @SuppressWarnings("deprecation")
  44 public class TypeParameterDeclarationImpl extends DeclarationImpl
  45                                           implements TypeParameterDeclaration
  46 {
  47     protected TypeSymbol sym;
  48 
  49 
  50     TypeParameterDeclarationImpl(AptEnv env, TypeSymbol sym) {
  51         super(env, sym);
  52         this.sym = sym;
  53     }
  54 
  55 
  56     /**
  57      * Returns the type parameter's name along with any "extends" clause.
  58      * Class names are qualified.  No implicit "extends Object" is added.
  59      */
  60     public String toString() {
  61         return toString(env, (Type.TypeVar) sym.type);
  62     }
  63