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

Print this page




  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 
  30 import com.sun.mirror.type.PrimitiveType;
  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 import static com.sun.mirror.type.PrimitiveType.Kind.*;
  36 
  37 
  38 /**
  39  * Implementation of PrimitiveType.
  40  */
  41 
  42 class PrimitiveTypeImpl extends TypeMirrorImpl implements PrimitiveType {
  43 
  44     private final Kind kind;    // the kind of primitive
  45 
  46 
  47     PrimitiveTypeImpl(AptEnv env, Kind kind) {
  48         super(env, getType(env, kind));
  49         this.kind = kind;
  50     }
  51 
  52 
  53     /**
  54      * {@inheritDoc}
  55      */
  56     public Kind getKind() {
  57         return kind;
  58     }
  59 
  60     /**
  61      * {@inheritDoc}




  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 
  30 import com.sun.mirror.type.PrimitiveType;
  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 import static com.sun.mirror.type.PrimitiveType.Kind.*;
  36 
  37 
  38 /**
  39  * Implementation of PrimitiveType.
  40  */
  41 @SuppressWarnings("deprecation")
  42 class PrimitiveTypeImpl extends TypeMirrorImpl implements PrimitiveType {
  43 
  44     private final Kind kind;    // the kind of primitive
  45 
  46 
  47     PrimitiveTypeImpl(AptEnv env, Kind kind) {
  48         super(env, getType(env, kind));
  49         this.kind = kind;
  50     }
  51 
  52 
  53     /**
  54      * {@inheritDoc}
  55      */
  56     public Kind getKind() {
  57         return kind;
  58     }
  59 
  60     /**
  61      * {@inheritDoc}