src/share/classes/com/sun/tools/apt/mirror/type/ClassTypeImpl.java

Print this page




  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  22  * CA 95054 USA or visit www.sun.com if you need additional information or
  23  * have any questions.
  24  */
  25 
  26 package com.sun.tools.apt.mirror.type;
  27 
  28 
  29 import com.sun.mirror.declaration.*;
  30 import com.sun.mirror.type.*;
  31 import com.sun.mirror.util.TypeVisitor;
  32 import com.sun.tools.apt.mirror.AptEnv;
  33 import com.sun.tools.javac.code.Type;
  34 
  35 
  36 /**
  37  * Implementation of ClassType
  38  */
  39 
  40 public class ClassTypeImpl extends DeclaredTypeImpl implements ClassType {
  41 
  42     ClassTypeImpl(AptEnv env, Type.ClassType type) {
  43         super(env, type);
  44     }
  45 
  46 
  47     /**
  48      * {@inheritDoc}
  49      */
  50     public ClassDeclaration getDeclaration() {
  51         return (ClassDeclaration) super.getDeclaration();
  52     }
  53 
  54     /**
  55      * {@inheritDoc}
  56      */
  57     public ClassType getSuperclass() {
  58         //  java.lang.Object has no superclass
  59         if (type.tsym == env.symtab.objectType.tsym) {


  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  22  * CA 95054 USA or visit www.sun.com if you need additional information or
  23  * have any questions.
  24  */
  25 
  26 package com.sun.tools.apt.mirror.type;
  27 
  28 
  29 import com.sun.mirror.declaration.*;
  30 import com.sun.mirror.type.*;
  31 import com.sun.mirror.util.TypeVisitor;
  32 import com.sun.tools.apt.mirror.AptEnv;
  33 import com.sun.tools.javac.code.Type;
  34 
  35 
  36 /**
  37  * Implementation of ClassType
  38  */
  39 @SuppressWarnings("deprecation")
  40 public class ClassTypeImpl extends DeclaredTypeImpl implements ClassType {
  41 
  42     ClassTypeImpl(AptEnv env, Type.ClassType type) {
  43         super(env, type);
  44     }
  45 
  46 
  47     /**
  48      * {@inheritDoc}
  49      */
  50     public ClassDeclaration getDeclaration() {
  51         return (ClassDeclaration) super.getDeclaration();
  52     }
  53 
  54     /**
  55      * {@inheritDoc}
  56      */
  57     public ClassType getSuperclass() {
  58         //  java.lang.Object has no superclass
  59         if (type.tsym == env.symtab.objectType.tsym) {