Package com.google.gwt.dev.util

Examples of com.google.gwt.dev.util.JsniRef.className()


            new NoSuchFieldError(jsniMemberRef));
        return -1;
      }

      // Do the lookup by class name.
      String className = parsed.className();
      DispatchClassInfo dispClassInfo = getClassInfoFromClassName(className);
      if (dispClassInfo != null) {
        String memberName = parsed.memberSignature();
        int memberId = dispClassInfo.getMemberId(memberName);
        if (memberId < 0) {
View Full Code Here


        if (jsniRef != null) {
          ReferenceBinding clazz = findClass(jsniRef);
          if (looksLikeAnonymousClass(jsniRef)
              || (clazz != null && clazz.isAnonymousType())) {
            GWTProblem.recordInCud(ProblemSeverities.Warning, meth, cud,
                "Referencing class '" + jsniRef.className()
                    + ": JSNI references to anonymous classes are deprecated",
                null);
          } else if (clazz != null) {
            Set<String> refErrors = new LinkedHashSet<String>();
            if (jsniRef.isMethod()) {
View Full Code Here

              checkFieldRef(clazz, jsniRef, refErrors);
            }
            if (!refErrors.isEmpty()) {
              errors.put(jsniRefString, refErrors);
            }
          } else if (!jsniRef.className().equals("null")) {
            /*
             * TODO(scottb): re-enable this when we no longer get a bunch of
             * false failures. Currently we can't resolve top level types (like
             * boolean_Array_Rank_1_FieldSerializer), and we also don't resolve
             * array and primitive refs, like @Z[]::class.
View Full Code Here

   *            the method jsni signature which body will be searched for field references.
   */
  private String[] getJsniFieldReferences(String methodSignature) {
    JsniRef parsed = JsniRef.parse(methodSignature);
    if (parsed != null) {
      String lookupClassName = parsed.className().replace('.', '/');
      CompilationUnit compilationUnit = classLoader.getUnitForClassName(lookupClassName);
      if (compilationUnit != null) {
        for (JsniMethod jsniMethod : compilationUnit.getJsniMethods()) {
          if (jsniMethod.name().equals(methodSignature)) {
            String source = jsniMethod.function().toSource();
View Full Code Here

            String fieldName = parsedSignature.memberName();
            int referenceIndex = fieldName.indexOf('.');
            if (referenceIndex != -1) {
              fieldName = fieldName.substring(0, referenceIndex);
            }
            fieldRefs.add("@" + parsedSignature.className() + "::" + fieldName);
          }
        }
        code = code.substring(closeIndex, code.length());
      }
    }
View Full Code Here

            new NoSuchFieldError(jsniMemberRef));
        return -1;
      }

      // Do the lookup by class name.
      String className = parsed.className();
      DispatchClassInfo dispClassInfo = getClassInfoFromClassName(className);
      if (dispClassInfo != null) {
        String memberName = parsed.memberSignature();

        /*
 
View Full Code Here

    Set<String> dependentTypeNames = new HashSet<String>();
    for (String jsniRef : jsniRefs) {
      JsniRef parsed = JsniRef.parse(jsniRef);
      if (parsed != null) {
        // If we fail to parse, don't add a class reference.
        dependentTypeNames.add(parsed.className());
      }
    }
    return dependentTypeNames.toArray(Empty.STRINGS);
  }
View Full Code Here

            new NoSuchFieldError(jsniMemberRef));
        return -1;
      }

      // Do the lookup by class name.
      String className = parsed.className();
      DispatchClassInfo dispClassInfo = getClassInfoFromClassName(className);
      if (dispClassInfo != null) {
        String memberName = parsed.memberSignature();
        int memberId = dispClassInfo.getMemberId(memberName);
        if (memberId < 0) {
View Full Code Here

            new NoSuchFieldError(jsniMemberRef));
        return -1;
      }

      // Do the lookup by class name.
      String className = parsed.className();
      DispatchClassInfo dispClassInfo = getClassInfoFromClassName(className);
      if (dispClassInfo != null) {
        String memberName = parsed.memberSignature();

        /*
 
View Full Code Here

            new NoSuchFieldError(jsniMemberRef));
        return -1;
      }

      // Do the lookup by class name.
      String className = parsed.className();
      DispatchClassInfo dispClassInfo = getClassInfoFromClassName(className);
      if (dispClassInfo != null) {
        String memberName = parsed.memberSignature();

        /*
 
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.