示例#1
0
  @Override
  public void visitClientRpc(TreeLogger logger, JClassType type, ConnectorBundle bundle)
      throws UnableToCompleteException {
    checkGenericType(logger, type);
    Set<? extends JClassType> hierarchy = type.getFlattenedSupertypeHierarchy();
    for (JClassType subType : hierarchy) {
      JMethod[] methods = subType.getMethods();
      for (JMethod method : methods) {
        checkReturnType(logger, method);

        bundle.setNeedsInvoker(type, method);
        bundle.setNeedsParamTypes(type, method);
        if (method.getAnnotation(NoLayout.class) != null) {
          bundle.setMethodAttribute(type, method, MethodAttribute.NO_LAYOUT);
        }

        JType[] parameterTypes = method.getParameterTypes();
        for (JType paramType : parameterTypes) {
          bundle.setNeedsSerialize(paramType);
        }
      }
    }
  }