< prev index next >

src/java.compiler/share/classes/javax/lang/model/type/TypeKind.java

Print this page




 140     OTHER,
 141 
 142     /**
 143       * A union type.
 144       *
 145       * @since 1.7
 146       */
 147     UNION,
 148 
 149     /**
 150       * An intersection type.
 151       *
 152       * @since 1.8
 153       */
 154     INTERSECTION,
 155 
 156     /**
 157      * A pseudo-type corresponding to a module element.
 158      * @see NoType
 159      * @since 9

 160      */
 161     MODULE;
 162 
 163     /**
 164      * Returns {@code true} if this kind corresponds to a primitive
 165      * type and {@code false} otherwise.
 166      * @return {@code true} if this kind corresponds to a primitive type
 167      */
 168     public boolean isPrimitive() {
 169         switch(this) {
 170         case BOOLEAN:
 171         case BYTE:
 172         case SHORT:
 173         case INT:
 174         case LONG:
 175         case CHAR:
 176         case FLOAT:
 177         case DOUBLE:
 178             return true;
 179 


 140     OTHER,
 141 
 142     /**
 143       * A union type.
 144       *
 145       * @since 1.7
 146       */
 147     UNION,
 148 
 149     /**
 150       * An intersection type.
 151       *
 152       * @since 1.8
 153       */
 154     INTERSECTION,
 155 
 156     /**
 157      * A pseudo-type corresponding to a module element.
 158      * @see NoType
 159      * @since 9
 160      * @spec JPMS
 161      */
 162     MODULE;
 163 
 164     /**
 165      * Returns {@code true} if this kind corresponds to a primitive
 166      * type and {@code false} otherwise.
 167      * @return {@code true} if this kind corresponds to a primitive type
 168      */
 169     public boolean isPrimitive() {
 170         switch(this) {
 171         case BOOLEAN:
 172         case BYTE:
 173         case SHORT:
 174         case INT:
 175         case LONG:
 176         case CHAR:
 177         case FLOAT:
 178         case DOUBLE:
 179             return true;
 180 
< prev index next >