Package com.sun.mirror.type

Examples of com.sun.mirror.type.PrimitiveType


    }

    // Check suported types (int, long, float, String)
    TypeMirror field_type = field.getType();
    if ( field_type instanceof PrimitiveType ) {
      PrimitiveType field_type_prim = (PrimitiveType)field_type;
      PrimitiveType.Kind field_kind = field_type_prim.getKind();
      if ( field_kind != PrimitiveType.Kind.INT
           && field_kind != PrimitiveType.Kind.LONG
           && field_kind != PrimitiveType.Kind.FLOAT ) {
        throw new RuntimeException("Field " + field.getSimpleName() + " is not of type 'int', 'long' or 'float'");
      }
View Full Code Here


    }

    // Check suported types (int, long, float, String)
    TypeMirror field_type = field.getType();
    if ( field_type instanceof PrimitiveType ) {
      PrimitiveType field_type_prim = (PrimitiveType)field_type;
      PrimitiveType.Kind field_kind = field_type_prim.getKind();
      if ( field_kind != PrimitiveType.Kind.INT
           && field_kind != PrimitiveType.Kind.LONG
           && field_kind != PrimitiveType.Kind.FLOAT
           && field_kind != PrimitiveType.Kind.BYTE ) {
        throw new RuntimeException("Field " + field.getSimpleName() + " is not of type 'int', 'long' or 'float'");
View Full Code Here

TOP

Related Classes of com.sun.mirror.type.PrimitiveType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.