Package com.google.gwt.core.ext

Examples of com.google.gwt.core.ext.TreeLogger.log()


            + exported.getName() + " in read-only wrapper.", null);
        return true;

      } else if (!context.maintainIdentity && !exported.isStatic()) {
        // If we have no __gwtPeer object, only allow static methods
        logger.log(TreeLogger.ERROR, "Cannot export instance function "
            + exported.getName() + " in noIdentity wrapper.", null);
        return true;
      }
    }
View Full Code Here


      }
    }

    if (binding != null) {
      if (!JPrimitiveType.VOID.equals(binding.getReturnType().isPrimitive())) {
        logger.log(TreeLogger.ERROR,
            "Binding functions must have a void type.", null);
        return true;
      }

      JParameter[] params = binding.getParameters();
View Full Code Here

      }

      JParameter[] params = binding.getParameters();
      if (params.length == 0
          || !jsoType.isAssignableFrom(params[0].getType().isClassOrInterface())) {
        logger.log(TreeLogger.ERROR, "The first parameter of a binding method "
            + "must be a JavaScriptObject", null);
        return true;
      }
    }
View Full Code Here

    } else if (bindingAnnotation != null
        && bindingAnnotation.value().length() > 0) {
      // Use the binding type specified in the the gwt.binding annotation.
      bindingType = typeOracle.findType(bindingAnnotation.value());
      if (bindingType == null) {
        logger.log(TreeLogger.ERROR, "Could not resolve binding type "
            + bindingType, null);
        throw new UnableToCompleteException();
      }
    }
View Full Code Here

      // Extract the exported methods
      context.tasks = TaskFactory.extractMethods(logger, typeOracle,
          bindingType, TaskFactory.EXPORTER_POLICY).values();
      writeMethodBindings(context);
    } else {
      logger.log(TreeLogger.DEBUG,
          "Not binding methods to any particular type.", null);
    }

    sw.outdent();
    sw.println("}-*/;");
 
View Full Code Here

        subParams.parameterName = parameters[i].getName();

        FragmentGenerator fragmentGenerator = context.fragmentGeneratorOracle.findFragmentGenerator(
            logger, context.typeOracle, subType);
        if (fragmentGenerator == null) {
          logger.log(TreeLogger.ERROR, "No fragment generator for "
              + returnType.getQualifiedSourceName(), null);
          throw new UnableToCompleteException();
        }

        fragmentGenerator.toJS(subParams);
View Full Code Here

    } else if (globalAnnotation != null) {
      sw.print(globalAnnotation.value());

    } else {
      logger.log(TreeLogger.ERROR,
          "Writing a constructor, but no constructor-appropriate annotations",
          null);
      throw new UnableToCompleteException();
    }
    sw.println(";");
View Full Code Here

      subParams.parameterName = "arg" + i;

      FragmentGenerator fragmentGenerator = fgo.findFragmentGenerator(logger,
          context.typeOracle, returnType);
      if (fragmentGenerator == null) {
        logger.log(TreeLogger.ERROR, "No fragment generator for "
            + returnType.getQualifiedSourceName(), null);
        throw new UnableToCompleteException();
      }

      fragmentGenerator.fromJS(subParams);
View Full Code Here

    SourceWriter sw = context.sw;
    TypeOracle typeOracle = context.typeOracle;
    JClassType functionClass = context.returnType.isClassOrInterface();

    if (functionClass.equals(typeOracle.findType(JSFunction.class.getName()))) {
      logger.log(TreeLogger.ERROR, "You must use a subinterface of JSFunction"
          + " so that the generator can extract a method signature.", null);
      throw new UnableToCompleteException();
    }

    // This is to support the JSFunction having the same lifetime as the
View Full Code Here

    } else if (isAssignable(typeOracle, returnType, Short.class)) {
      sw.print("(S)(");

    } else {
      logger.log(TreeLogger.ERROR, "Unknown boxed type "
          + returnType.getQualifiedSourceName(), null);
      throw new UnableToCompleteException();
    }

    sw.print(context.parameterName);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.