Package com.google.gwt.core.ext.typeinfo

Examples of com.google.gwt.core.ext.typeinfo.JPrimitiveType


        Map<String, String> formatArgs,
        String subformat,
        String argName,
        JType argType,
        Parameters params) {
      JPrimitiveType argPrimType = argType.isPrimitive();
      if (argPrimType != null) {
        if (argPrimType == JPrimitiveType.BOOLEAN || argPrimType == JPrimitiveType.VOID) {
          logger.log(TreeLogger.ERROR, "Illegal argument type for number format");
          return true;
        }
View Full Code Here


        offset = offsetAnnot.value();
      }
      this.pluralOffset = offset;
      boolean isArray = false;
      boolean isList = false;
      JPrimitiveType primType = argType.isPrimitive();
      JClassType classType = argType.isInterface();
      if (classType != null) {
        classType = classType.getErasedType();
        if ("java.util.List".equals(classType.getQualifiedSourceName())) {
          isList = true;
View Full Code Here

    if (classReturnType != null && classReturnType == classCollection.stringClass) {
      returnString = true;
    } else {
      returnString = false;

      JPrimitiveType primitiveReturnType = method.getReturnType().isPrimitive();
      if (primitiveReturnType == null
          || primitiveReturnType != JPrimitiveType.VOID) {
        logger.log(
            TreeLogger.WARN,
            "In presenter " + presenterInspector.getPresenterClassName()
View Full Code Here

                + "returning Map or Map<String,String>");
      }
    }
    if (intValue != null) {
      constantsCount++;
      JPrimitiveType primType = returnType.isPrimitive();
      if (primType != JPrimitiveType.INT) {
        throw new AnnotationsError(
            "@DefaultIntValue can only be used with a method returning int");
      }
    }
    if (floatValue != null) {
      constantsCount++;
      JPrimitiveType primType = returnType.isPrimitive();
      if (primType != JPrimitiveType.FLOAT) {
        throw new AnnotationsError(
            "@DefaultFloatValue can only be used with a method returning float");
      }
    }
    if (doubleValue != null) {
      constantsCount++;
      JPrimitiveType primType = returnType.isPrimitive();
      if (primType != JPrimitiveType.DOUBLE) {
        throw new AnnotationsError(
            "@DefaultDoubleValue can only be used with a method returning double");
      }
    }
    if (booleanValue != null) {
      constantsCount++;
      JPrimitiveType primType = returnType.isPrimitive();
      if (primType != JPrimitiveType.BOOLEAN) {
        throw new AnnotationsError(
            "@DefaultBooleanValue can only be used with a method returning boolean");
      }
    }
View Full Code Here

  /**
   * @return string containing return type name
   */
  protected String getReturnTypeName() {
    String type;
    JPrimitiveType s = returnType.isPrimitive();
    if (s != null) {
      type = AbstractSourceCreator.getJavaObjectTypeFor(s);
    } else {
      type = returnType.getParameterizedQualifiedSourceName();
    }
View Full Code Here

  private static final JClassType[] NO_JCLASSES = new JClassType[0];
  private static final Pattern PATTERN_WHITESPACE = Pattern.compile("\\s");

  public static String computeBinaryClassName(JType type) {
    JPrimitiveType primitiveType = type.isPrimitive();
    if (primitiveType != null) {
      return primitiveType.getJNISignature();
    }

    JArrayType arrayType = type.isArray();
    if (arrayType != null) {
      JType component = arrayType.getComponentType();
View Full Code Here

   * @throws UnableToCompleteException
   */
  protected void checkReturnType(TreeLogger logger, JMethod method)
      throws UnableToCompleteException {
    JType returnType = method.getReturnType();
    JPrimitiveType primitive = returnType.isPrimitive();
    if (primitive != null && (primitive == JPrimitiveType.BOOLEAN
        || primitive == JPrimitiveType.DOUBLE
        || primitive == JPrimitiveType.FLOAT
        || primitive == JPrimitiveType.INT)) {
      return;
View Full Code Here

  }

  @SuppressWarnings( "unused" )
  private String boxPrimative( JType type ) {
    if ( type.isPrimitive() != null ) {
      JPrimitiveType primative = type.isPrimitive();
      return primative.getQualifiedBoxedSourceName();
    } else {
      return type.getQualifiedSourceName();
    }
  }
View Full Code Here

  }

  @SuppressWarnings( "unused" )
  private String boxPrimative( JType type ) {
    if ( type.isPrimitive() != null ) {
      JPrimitiveType primative = type.isPrimitive();
      return primative.getQualifiedBoxedSourceName();
    } else {
      return type.getQualifiedSourceName();
    }
  }
View Full Code Here

  }

  private String getBinaryOrPrimitiveName(JType type) {
    JArrayType asArray = type.isArray();
    JClassType asClass = type.isClassOrInterface();
    JPrimitiveType asPrimitive = type.isPrimitive();
    if (asClass != null) {
      return getBinaryName(asClass);
    } else if (asPrimitive != null) {
      return asPrimitive.getQualifiedSourceName();
    } else if (asArray != null) {
      JType componentType = asArray.getComponentType();
      return getBinaryOrPrimitiveName(componentType) + "[]";
    } else {
      throw new InternalCompilerException("Cannot create binary name for "
View Full Code Here

TOP

Related Classes of com.google.gwt.core.ext.typeinfo.JPrimitiveType

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.