com.google.gwt.user.server.rpc.RPC.printTypeName()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(9.7k)|赞(0)|评价(0)|浏览(213)

本文整理了Java中com.google.gwt.user.server.rpc.RPC.printTypeName方法的一些代码示例,展示了RPC.printTypeName的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RPC.printTypeName方法的具体详情如下:
包路径:com.google.gwt.user.server.rpc.RPC
类名称:RPC
方法名:printTypeName

RPC.printTypeName介绍

[英]Straight copy from com.google.gwt.dev.util.TypeInfo#getSourceRepresentation(Class) to avoid runtime dependency on gwt-dev.
[中]直接从com复制。谷歌。gwt。dev.util。TypeInfo#getSourceRepresentation(类),以避免运行时对gwt-dev的依赖。

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

private static String formatMethodNotFoundErrorMessage(Class<?> serviceIntf,
  String serviceMethodName, Class<?>[] parameterTypes) {
 StringBuffer sb = new StringBuffer();
 sb.append("Could not locate requested method '");
 sb.append(serviceMethodName);
 sb.append("(");
 for (int i = 0; i < parameterTypes.length; ++i) {
  if (i > 0) {
   sb.append(", ");
  }
  sb.append(printTypeName(parameterTypes[i]));
 }
 sb.append(")'");
 sb.append(" in interface '");
 sb.append(printTypeName(serviceIntf));
 sb.append("'");
 return sb.toString();
}

代码示例来源:origin: com.google.gwt/gwt-servlet

private static String formatIllegalAccessErrorMessage(Object target, Method serviceMethod) {
 StringBuffer sb = new StringBuffer();
 sb.append("Blocked attempt to access inaccessible method '");
 sb.append(getSourceRepresentation(serviceMethod));
 sb.append("'");
 if (target != null) {
  sb.append(" on target '");
  sb.append(printTypeName(target.getClass()));
  sb.append("'");
 }
 sb.append("; this is either misconfiguration or a hack attempt");
 return sb.toString();
}

代码示例来源:origin: com.google.gwt/gwt-servlet

private static String formatIllegalArgumentErrorMessage(Object target, Method serviceMethod,
  Object[] args) {
 StringBuffer sb = new StringBuffer();
 sb.append("Blocked attempt to invoke method '");
 sb.append(getSourceRepresentation(serviceMethod));
 sb.append("'");
 if (target != null) {
  sb.append(" on target '");
  sb.append(printTypeName(target.getClass()));
  sb.append("'");
 }
 sb.append(" with invalid arguments");
 if (args != null && args.length > 0) {
  sb.append(Arrays.asList(args));
 }
 return sb.toString();
}

代码示例来源:origin: com.google.gwt/gwt-servlet

return printTypeName(componentType) + "[]";

代码示例来源:origin: com.google.gwt/gwt-servlet

public static String encodeResponseForSuccess(Method serviceMethod, Object object,
  SerializationPolicy serializationPolicy, int flags) throws SerializationException {
 if (serviceMethod == null) {
  throw new NullPointerException("serviceMethod cannot be null");
 }
 if (serializationPolicy == null) {
  throw new NullPointerException("serializationPolicy");
 }
 Class<?> methodReturnType = serviceMethod.getReturnType();
 if (methodReturnType != void.class && object != null) {
  Class<?> actualReturnType;
  if (methodReturnType.isPrimitive()) {
   actualReturnType = getPrimitiveClassFromWrapper(object.getClass());
  } else {
   actualReturnType = object.getClass();
  }
  if (actualReturnType == null || !methodReturnType.isAssignableFrom(actualReturnType)) {
   throw new IllegalArgumentException("Type '" + printTypeName(object.getClass())
     + "' does not match the return type in the method's signature: '"
     + getSourceRepresentation(serviceMethod) + "'");
  }
 }
 return encodeResponse(methodReturnType, object, false, flags, serializationPolicy);
}

代码示例来源:origin: com.google.gwt/gwt-servlet

+ serviceIntfName + "', which is not implemented by '" + printTypeName(type)
+ "'; this is either misconfiguration or a hack attempt");
  + printTypeName(serviceIntf)
  + "', which doesn't extend RemoteService; this is either "
  + "misconfiguration or a hack attempt");

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

private static String formatIllegalAccessErrorMessage(Object target, Method serviceMethod) {
 StringBuffer sb = new StringBuffer();
 sb.append("Blocked attempt to access inaccessible method '");
 sb.append(getSourceRepresentation(serviceMethod));
 sb.append("'");
 if (target != null) {
  sb.append(" on target '");
  sb.append(printTypeName(target.getClass()));
  sb.append("'");
 }
 sb.append("; this is either misconfiguration or a hack attempt");
 return sb.toString();
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

private static String formatMethodNotFoundErrorMessage(Class<?> serviceIntf,
  String serviceMethodName, Class<?>[] parameterTypes) {
 StringBuffer sb = new StringBuffer();
 sb.append("Could not locate requested method '");
 sb.append(serviceMethodName);
 sb.append("(");
 for (int i = 0; i < parameterTypes.length; ++i) {
  if (i > 0) {
   sb.append(", ");
  }
  sb.append(printTypeName(parameterTypes[i]));
 }
 sb.append(")'");
 sb.append(" in interface '");
 sb.append(printTypeName(serviceIntf));
 sb.append("'");
 return sb.toString();
}

代码示例来源:origin: net.wetheinter/gwt-user

private static String formatIllegalAccessErrorMessage(Object target, Method serviceMethod) {
 StringBuffer sb = new StringBuffer();
 sb.append("Blocked attempt to access inaccessible method '");
 sb.append(getSourceRepresentation(serviceMethod));
 sb.append("'");
 if (target != null) {
  sb.append(" on target '");
  sb.append(printTypeName(target.getClass()));
  sb.append("'");
 }
 sb.append("; this is either misconfiguration or a hack attempt");
 return sb.toString();
}

代码示例来源:origin: net.wetheinter/gwt-user

private static String formatMethodNotFoundErrorMessage(Class<?> serviceIntf,
  String serviceMethodName, Class<?>[] parameterTypes) {
 StringBuffer sb = new StringBuffer();
 sb.append("Could not locate requested method '");
 sb.append(serviceMethodName);
 sb.append("(");
 for (int i = 0; i < parameterTypes.length; ++i) {
  if (i > 0) {
   sb.append(", ");
  }
  sb.append(printTypeName(parameterTypes[i]));
 }
 sb.append(")'");
 sb.append(" in interface '");
 sb.append(printTypeName(serviceIntf));
 sb.append("'");
 return sb.toString();
}

代码示例来源:origin: net.wetheinter/gwt-user

private static String formatIllegalArgumentErrorMessage(Object target, Method serviceMethod,
  Object[] args) {
 StringBuffer sb = new StringBuffer();
 sb.append("Blocked attempt to invoke method '");
 sb.append(getSourceRepresentation(serviceMethod));
 sb.append("'");
 if (target != null) {
  sb.append(" on target '");
  sb.append(printTypeName(target.getClass()));
  sb.append("'");
 }
 sb.append(" with invalid arguments");
 if (args != null && args.length > 0) {
  sb.append(Arrays.asList(args));
 }
 return sb.toString();
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

private static String formatIllegalArgumentErrorMessage(Object target, Method serviceMethod,
  Object[] args) {
 StringBuffer sb = new StringBuffer();
 sb.append("Blocked attempt to invoke method '");
 sb.append(getSourceRepresentation(serviceMethod));
 sb.append("'");
 if (target != null) {
  sb.append(" on target '");
  sb.append(printTypeName(target.getClass()));
  sb.append("'");
 }
 sb.append(" with invalid arguments");
 if (args != null && args.length > 0) {
  sb.append(Arrays.asList(args));
 }
 return sb.toString();
}

代码示例来源:origin: net.wetheinter/gwt-user

return printTypeName(componentType) + "[]";

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

return printTypeName(componentType) + "[]";

代码示例来源:origin: net.wetheinter/gwt-user

public static String encodeResponseForSuccess(Method serviceMethod, Object object,
  SerializationPolicy serializationPolicy, int flags) throws SerializationException {
 if (serviceMethod == null) {
  throw new NullPointerException("serviceMethod cannot be null");
 }
 if (serializationPolicy == null) {
  throw new NullPointerException("serializationPolicy");
 }
 Class<?> methodReturnType = serviceMethod.getReturnType();
 if (methodReturnType != void.class && object != null) {
  Class<?> actualReturnType;
  if (methodReturnType.isPrimitive()) {
   actualReturnType = getPrimitiveClassFromWrapper(object.getClass());
  } else {
   actualReturnType = object.getClass();
  }
  if (actualReturnType == null || !methodReturnType.isAssignableFrom(actualReturnType)) {
   throw new IllegalArgumentException("Type '" + printTypeName(object.getClass())
     + "' does not match the return type in the method's signature: '"
     + getSourceRepresentation(serviceMethod) + "'");
  }
 }
 return encodeResponse(methodReturnType, object, false, flags, serializationPolicy);
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

public static String encodeResponseForSuccess(Method serviceMethod, Object object,
  SerializationPolicy serializationPolicy, int flags) throws SerializationException {
 if (serviceMethod == null) {
  throw new NullPointerException("serviceMethod cannot be null");
 }
 if (serializationPolicy == null) {
  throw new NullPointerException("serializationPolicy");
 }
 Class<?> methodReturnType = serviceMethod.getReturnType();
 if (methodReturnType != void.class && object != null) {
  Class<?> actualReturnType;
  if (methodReturnType.isPrimitive()) {
   actualReturnType = getPrimitiveClassFromWrapper(object.getClass());
  } else {
   actualReturnType = object.getClass();
  }
  if (actualReturnType == null || !methodReturnType.isAssignableFrom(actualReturnType)) {
   throw new IllegalArgumentException("Type '" + printTypeName(object.getClass())
     + "' does not match the return type in the method's signature: '"
     + getSourceRepresentation(serviceMethod) + "'");
  }
 }
 return encodeResponse(methodReturnType, object, false, flags, serializationPolicy);
}

代码示例来源:origin: net.wetheinter/gwt-user

+ serviceIntfName + "', which is not implemented by '" + printTypeName(type)
+ "'; this is either misconfiguration or a hack attempt");
  + printTypeName(serviceIntf)
  + "', which doesn't extend RemoteService; this is either "
  + "misconfiguration or a hack attempt");

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

+ serviceIntfName + "', which is not implemented by '" + printTypeName(type)
+ "'; this is either misconfiguration or a hack attempt");
  + printTypeName(serviceIntf)
  + "', which doesn't extend RemoteService; this is either "
  + "misconfiguration or a hack attempt");

相关文章