com.google.gwt.core.shared.GWT.isScript()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(157)

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

GWT.isScript介绍

[英]Determines whether or not the running program is script or bytecode.
[中]确定正在运行的程序是脚本还是字节码。

代码示例

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

  1. /**
  2. * Determines whether or not the running program is script or bytecode.
  3. */
  4. public static boolean isScript() {
  5. return com.google.gwt.core.shared.GWT.isScript();
  6. }

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

  1. public final String getSerializationSignature(Class<?> clazz) {
  2. assert clazz != null : "clazz";
  3. if (GWT.isScript()) {
  4. return signatureMapNative.get(clazz.hashCode());
  5. } else {
  6. return signatureMapJava.get(clazz.getName());
  7. }
  8. }

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

  1. if (GWT.isScript()) {
  2. uri = URL.encode(uri);

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

  1. public final void deserialize(SerializationStreamReader stream,
  2. Object instance, String typeSignature) throws SerializationException {
  3. if (GWT.isScript()) {
  4. check(typeSignature, 2);
  5. methodMapNative.deserialize(stream, instance, typeSignature);
  6. } else {
  7. TypeHandler typeHandler = getTypeHandler(typeSignature);
  8. typeHandler.deserial(stream, instance);
  9. }
  10. }

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

  1. public final void serialize(SerializationStreamWriter stream,
  2. Object instance, String typeSignature) throws SerializationException {
  3. if (GWT.isScript()) {
  4. check(typeSignature, 3);
  5. methodMapNative.serialize(stream, instance, typeSignature);
  6. } else {
  7. TypeHandler typeHandler = getTypeHandler(typeSignature);
  8. typeHandler.serial(stream, instance);
  9. }
  10. }

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

  1. public final Object instantiate(SerializationStreamReader stream,
  2. String typeSignature) throws SerializationException {
  3. if (GWT.isScript()) {
  4. check(typeSignature, 1);
  5. return methodMapNative.instantiate(stream, typeSignature);
  6. } else {
  7. TypeHandler typeHandler = getTypeHandler(typeSignature);
  8. return typeHandler.create(stream);
  9. }
  10. }

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

  1. /**
  2. * Determines whether or not the running program is script or bytecode.
  3. */
  4. public static boolean isScript() {
  5. return com.google.gwt.core.shared.GWT.isScript();
  6. }

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

  1. /**
  2. * Determines whether or not the running program is script or bytecode.
  3. */
  4. public static boolean isScript() {
  5. return com.google.gwt.core.shared.GWT.isScript();
  6. }

代码示例来源:origin: com.google.web.bindery/requestfactory-server

  1. /**
  2. * Determines whether or not the running program is script or bytecode.
  3. */
  4. public static boolean isScript() {
  5. return com.google.gwt.core.shared.GWT.isScript();
  6. }

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

  1. public final String getSerializationSignature(Class<?> clazz) {
  2. assert clazz != null : "clazz";
  3. if (GWT.isScript()) {
  4. return signatureMapNative.get(clazz.hashCode());
  5. } else {
  6. return signatureMapJava.get(clazz.getName());
  7. }
  8. }

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

  1. public final String getSerializationSignature(Class<?> clazz) {
  2. assert clazz != null : "clazz";
  3. if (GWT.isScript()) {
  4. return signatureMapNative.get(clazz.hashCode());
  5. } else {
  6. return signatureMapJava.get(clazz.getName());
  7. }
  8. }

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

  1. public static void serialize(SerializationStreamWriter streamWriter,
  2. List<?> instance) throws SerializationException {
  3. Object[] array;
  4. if (GWT.isScript()) {
  5. // Violator pattern.
  6. array = ArraysViolator.getArray0(instance);
  7. } else {
  8. // Clone the underlying array.
  9. array = instance.toArray();
  10. }
  11. streamWriter.writeObject(array);
  12. }

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

  1. public static void serialize(SerializationStreamWriter streamWriter,
  2. List<?> instance) throws SerializationException {
  3. Object[] array;
  4. if (GWT.isScript()) {
  5. // Violator pattern.
  6. array = ArraysViolator.getArray0(instance);
  7. } else {
  8. // Clone the underlying array.
  9. array = instance.toArray();
  10. }
  11. streamWriter.writeObject(array);
  12. }

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

  1. private static String annotationToString(Annotation defaultValue) {
  2. if (GWT.isScript()) {
  3. return defaultValue.toString();
  4. } else {

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

  1. public final void serialize(SerializationStreamWriter stream,
  2. Object instance, String typeSignature) throws SerializationException {
  3. if (GWT.isScript()) {
  4. check(typeSignature, 3);
  5. methodMapNative.serialize(stream, instance, typeSignature);
  6. } else {
  7. TypeHandler typeHandler = getTypeHandler(typeSignature);
  8. typeHandler.serial(stream, instance);
  9. }
  10. }

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

  1. public final void deserialize(SerializationStreamReader stream,
  2. Object instance, String typeSignature) throws SerializationException {
  3. if (GWT.isScript()) {
  4. check(typeSignature, 2);
  5. methodMapNative.deserialize(stream, instance, typeSignature);
  6. } else {
  7. TypeHandler typeHandler = getTypeHandler(typeSignature);
  8. typeHandler.deserial(stream, instance);
  9. }
  10. }

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

  1. public final Object instantiate(SerializationStreamReader stream,
  2. String typeSignature) throws SerializationException {
  3. if (GWT.isScript()) {
  4. check(typeSignature, 1);
  5. return methodMapNative.instantiate(stream, typeSignature);
  6. } else {
  7. TypeHandler typeHandler = getTypeHandler(typeSignature);
  8. return typeHandler.create(stream);
  9. }
  10. }

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

  1. public final void deserialize(SerializationStreamReader stream,
  2. Object instance, String typeSignature) throws SerializationException {
  3. if (GWT.isScript()) {
  4. check(typeSignature, 2);
  5. methodMapNative.deserialize(stream, instance, typeSignature);
  6. } else {
  7. TypeHandler typeHandler = getTypeHandler(typeSignature);
  8. typeHandler.deserial(stream, instance);
  9. }
  10. }

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

  1. public final void serialize(SerializationStreamWriter stream,
  2. Object instance, String typeSignature) throws SerializationException {
  3. if (GWT.isScript()) {
  4. check(typeSignature, 3);
  5. methodMapNative.serialize(stream, instance, typeSignature);
  6. } else {
  7. TypeHandler typeHandler = getTypeHandler(typeSignature);
  8. typeHandler.serial(stream, instance);
  9. }
  10. }

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

  1. public final Object instantiate(SerializationStreamReader stream,
  2. String typeSignature) throws SerializationException {
  3. if (GWT.isScript()) {
  4. check(typeSignature, 1);
  5. return methodMapNative.instantiate(stream, typeSignature);
  6. } else {
  7. TypeHandler typeHandler = getTypeHandler(typeSignature);
  8. return typeHandler.create(stream);
  9. }
  10. }

相关文章