Package javax.lang.model.type

Examples of javax.lang.model.type.TypeKind


        return areEquivalent(type, subType) ||
               subType.isSubTypeOf(type);
    }

    public static boolean isImplicitNumericConversion(final Type<?> sourceType, final Type<?> targetType) {
        final TypeKind sourceKind = TypeUtils.getUnderlyingPrimitiveOrSelf(sourceType).getKind();
        final TypeKind targetKind = TypeUtils.getUnderlyingPrimitiveOrSelf(targetType).getKind();

        switch (sourceKind) {
            case BYTE:
                switch (targetKind) {
                    case BYTE:
View Full Code Here


                _types[i + 1] = coalesceKind(parameterTypes.get(i));
            }
        }

        private TypeKind coalesceKind(final Type<?> type) {
            final TypeKind kind = type.getKind();
            return kind.ordinal() <= TypeKind.VOID.ordinal() ? kind : TypeKind.DECLARED;
        }
View Full Code Here

      ArrayType at = (ArrayType) resultType;
      String boxedType = getBoxedTypeNameForTypeMirror(at.getComponentType());
      if (boxedType == null) return null;
      return boxedType+"[]";
    }
    TypeKind type = resultType.getKind();
    if (type == null) return null;
        if (type.equals(TypeKind.BOOLEAN)) {
      return "Boolean";
    } else if (type.equals(TypeKind.BYTE)) {
      return "Byte";
    } else if (type.equals(TypeKind.CHAR)) {
      return "Character";
    } else if (type.equals(TypeKind.DOUBLE)) {
      return "Double";
    } else if (type.equals(TypeKind.FLOAT)) {
      return "Float";
    } else if (type.equals(TypeKind.INT)) {
      return "Integer";
    } else if (type.equals(TypeKind.LONG)) {
      return "Long";
    } else if (type.equals(TypeKind.SHORT)) {
      return "Short";
    } else if (type.equals(TypeKind.VOID)) {
      return "Void";
    } else if (type.equals(TypeKind.DECLARED)) {
      return resultType.toString();
    }
        return null;
  }
View Full Code Here

TOP

Related Classes of javax.lang.model.type.TypeKind

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.