removed the compile issues in de.csenk.gwt.ws implementation

This commit is contained in:
Axel Uhl committed 2013-08-08 17:35:21 +02:00
1 parent 6dcafaae8f
commit f85bd5fb01
7 files changed
+53 -59

No files matched your search

@@ -35,6 +35,7 @@ import com.google.gwt.core.ext.GeneratorContext;
import com.google.gwt.core.ext.PropertyOracle;
import com.google.gwt.core.ext.TreeLogger;
import com.google.gwt.core.ext.UnableToCompleteException;
import com.google.gwt.core.ext.linker.EmittedArtifact.Visibility;
import com.google.gwt.core.ext.linker.GeneratedResource;
import com.google.gwt.core.ext.typeinfo.JClassType;
import com.google.gwt.core.ext.typeinfo.JField;
@@ -42,7 +43,6 @@ import com.google.gwt.core.ext.typeinfo.JPackage;
import com.google.gwt.core.ext.typeinfo.JType;
import com.google.gwt.core.ext.typeinfo.NotFoundException;
import com.google.gwt.core.ext.typeinfo.TypeOracle;
import com.google.gwt.dev.javac.TypeOracleMediator;
import com.google.gwt.dev.util.Util;
import com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException;
import com.google.gwt.user.linker.rpc.RpcPolicyFileArtifact;
@@ -182,8 +182,7 @@ public class GWTSerializerGenerator extends Generator {
.build(serializerLogger);
if (pathInfo != null) {
context.commitResource(serializerLogger, pathInfo).setPrivate(
true);
context.commitResource(serializerLogger, pathInfo).setVisibility(Visibility.Private);
}
} finally {
if (writer != null) {
@@ -199,8 +198,7 @@ public class GWTSerializerGenerator extends Generator {
serializerLogger, context, typesSentFromBrowser,
typesSentToBrowser, typeStrings, serializerInterface);
String serializerInterfaceName = TypeOracleMediator
.computeBinaryClassName(serializerInterface);
String serializerInterfaceName = serializerInterface.getQualifiedBinaryName();
generateFields(sourceWriter, typesSentFromBrowser,
serializationPolicyStrongName, serializerInterfaceName,
serializerInterface);
@@ -260,8 +258,7 @@ public class GWTSerializerGenerator extends Generator {
for (int i = 0; i < serializableTypes.length; ++i) {
JType type = serializableTypes[i];
String binaryTypeName = TypeOracleMediator
.computeBinaryClassName(type);
String binaryTypeName = type.getQualifiedBinaryName();
pw.print(binaryTypeName);
pw.print(", "
+ Boolean.toString(deserializationSto
@@ -15,6 +15,8 @@
*/
package de.csenk.gwt.ws.rebind.filter.serialization.com.google.gwt.user.rebind.rpc;
import java.io.PrintWriter;
import com.google.gwt.core.client.UnsafeNativeLong;
import com.google.gwt.core.client.impl.WeakMapping;
import com.google.gwt.core.ext.GeneratorContext;
@@ -26,7 +28,6 @@ import com.google.gwt.core.ext.typeinfo.JField;
import com.google.gwt.core.ext.typeinfo.JPrimitiveType;
import com.google.gwt.core.ext.typeinfo.JType;
import com.google.gwt.core.ext.typeinfo.TypeOracle;
import com.google.gwt.dev.javac.TypeOracleMediator;
import com.google.gwt.user.client.rpc.SerializationException;
import com.google.gwt.user.client.rpc.SerializationStreamReader;
import com.google.gwt.user.client.rpc.SerializationStreamWriter;
@@ -34,8 +35,6 @@ import com.google.gwt.user.client.rpc.core.java.lang.Object_Array_CustomFieldSer
import com.google.gwt.user.rebind.ClassSourceFileComposerFactory;
import com.google.gwt.user.rebind.SourceWriter;
import java.io.PrintWriter;
/**
* Creates a field serializer for a class that implements
* {@link com.google.gwt.user.client.rpc.IsSerializable IsSerializable} or
@@ -437,7 +436,7 @@ public class FieldSerializerCreator {
sourceWriter.indent();
sourceWriter.print("return instance.@");
sourceWriter.print(TypeOracleMediator.computeBinaryClassName(serializableClass));
sourceWriter.print(serializableClass.getQualifiedBinaryName());
sourceWriter.print("::");
sourceWriter.print(fieldName);
sourceWriter.println(";");
@@ -468,7 +467,7 @@ public class FieldSerializerCreator {
sourceWriter.indent();
sourceWriter.print("instance.@");
sourceWriter.print(TypeOracleMediator.computeBinaryClassName(serializableClass));
sourceWriter.print(serializableClass.getQualifiedBinaryName());
sourceWriter.print("::");
sourceWriter.print(fieldName);
sourceWriter.println(" = value;");
@@ -15,6 +15,18 @@
*/
package de.csenk.gwt.ws.rebind.filter.serialization.com.google.gwt.user.rebind.rpc;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.impl.Impl;
import com.google.gwt.core.ext.BadPropertyValueException;
@@ -23,6 +35,7 @@ import com.google.gwt.core.ext.GeneratorContext;
import com.google.gwt.core.ext.PropertyOracle;
import com.google.gwt.core.ext.TreeLogger;
import com.google.gwt.core.ext.UnableToCompleteException;
import com.google.gwt.core.ext.linker.EmittedArtifact.Visibility;
import com.google.gwt.core.ext.linker.GeneratedResource;
import com.google.gwt.core.ext.typeinfo.JClassType;
import com.google.gwt.core.ext.typeinfo.JField;
@@ -35,7 +48,6 @@ import com.google.gwt.core.ext.typeinfo.JType;
import com.google.gwt.core.ext.typeinfo.NotFoundException;
import com.google.gwt.core.ext.typeinfo.TypeOracle;
import com.google.gwt.dev.generator.NameFactory;
import com.google.gwt.dev.javac.TypeOracleMediator;
import com.google.gwt.dev.util.Util;
import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestBuilder;
@@ -54,18 +66,6 @@ import com.google.gwt.user.rebind.SourceWriter;
import com.google.gwt.user.server.rpc.SerializationPolicyLoader;
import com.google.gwt.user.server.rpc.impl.TypeNameObfuscator;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
/**
* Creates a client-side proxy for a
* {@link com.google.gwt.user.client.rpc.RemoteService RemoteService} interface
@@ -290,7 +290,7 @@ public class ProxyCreator {
typesSentToBrowser = typesSentToBrowserBuilder.build(logger);
if (pathInfo != null) {
context.commitResource(logger, pathInfo).setPrivate(true);
context.commitResource(logger, pathInfo).setVisibility(Visibility.Private);
}
} finally {
if (writer != null) {
@@ -306,7 +306,7 @@ public class ProxyCreator {
String remoteServiceInterfaceName = elideTypeNames
? TypeNameObfuscator.SERVICE_INTERFACE_ID
: TypeOracleMediator.computeBinaryClassName(serviceIntf);
: serviceIntf.getQualifiedBinaryName();
generateProxyFields(srcWriter, typesSentFromBrowser,
serializationPolicyStrongName, remoteServiceInterfaceName);
@@ -346,7 +346,7 @@ public class ProxyCreator {
if (typeStrings.containsKey(paramType)) {
typeName = typeStrings.get(paramType);
} else {
typeName = TypeOracleMediator.computeBinaryClassName(paramType);
typeName = paramType.getQualifiedBinaryName();
}
return typeName == null ? null : ('"' + typeName + '"');
}
@@ -638,7 +638,7 @@ public class ProxyCreator {
for (int i = 0; i < serializableTypes.length; ++i) {
JType type = serializableTypes[i];
String binaryTypeName = TypeOracleMediator.computeBinaryClassName(type);
String binaryTypeName = type.getQualifiedBinaryName();
pw.print(binaryTypeName);
pw.print(", "
+ Boolean.toString(deserializationSto.isSerializable(type)));
@@ -657,7 +657,7 @@ public class SerializableTypeOracleBuilder {
* Returns <code>true</code> if a serializer class could access this type.
*/
private static boolean isAccessibleToSerializer(JClassType type) {
if (type.isPrivate() || type.isLocalType()) {
if (type.isPrivate()) {
return false;
}
@@ -31,7 +31,6 @@ import com.google.gwt.core.ext.typeinfo.JField;
import com.google.gwt.core.ext.typeinfo.JParameterizedType;
import com.google.gwt.core.ext.typeinfo.JType;
import com.google.gwt.core.ext.typeinfo.TypeOracle;
import com.google.gwt.dev.javac.TypeOracleMediator;
import com.google.gwt.dev.util.Util;
/**
@@ -206,7 +205,7 @@ public class SerializationUtils {
return;
}
String serializedTypeName = TypeOracleMediator.computeBinaryClassName(type);
String serializedTypeName = type.getQualifiedBinaryName();
crc.update(serializedTypeName.getBytes(Util.DEFAULT_ENCODING));
if (excludeImplementationFromSerializationSignature(type)) {
@@ -228,7 +227,7 @@ public class SerializationUtils {
assert (field != null);
crc.update(field.getName().getBytes(Util.DEFAULT_ENCODING));
crc.update(TypeOracleMediator.computeBinaryClassName(field.getType()).getBytes(
crc.update(field.getType().getQualifiedBinaryName().getBytes(
Util.DEFAULT_ENCODING));
}
@@ -15,6 +15,12 @@
*/
package de.csenk.gwt.ws.rebind.filter.serialization.com.google.gwt.user.rebind.rpc;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import com.google.gwt.core.ext.typeinfo.JArrayType;
import com.google.gwt.core.ext.typeinfo.JClassType;
import com.google.gwt.core.ext.typeinfo.JGenericType;
@@ -22,15 +28,9 @@ import com.google.gwt.core.ext.typeinfo.JParameterizedType;
import com.google.gwt.core.ext.typeinfo.JRawType;
import com.google.gwt.core.ext.typeinfo.JRealClassType;
import com.google.gwt.core.ext.typeinfo.JType;
import com.google.gwt.core.ext.typeinfo.JTypeParameter;
import com.google.gwt.core.ext.typeinfo.JWildcardType;
import com.google.gwt.core.ext.typeinfo.TypeOracle;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import com.google.gwt.dev.javac.typemodel.JTypeParameter;
/**
* This class defines the method
@@ -84,7 +84,7 @@ public class TypeConstrainer {
return false;
}
private static JClassType[] makeArray(JClassType... classTypes) {
private static com.google.gwt.dev.javac.typemodel.JClassType[] makeArray(com.google.gwt.dev.javac.typemodel.JClassType... classTypes) {
return classTypes;
}
@@ -96,7 +96,7 @@ public class TypeConstrainer {
boolean foundIt = false;
@Override
public void endVisit(JTypeParameter seenParam) {
public void endVisit(com.google.gwt.core.ext.typeinfo.JTypeParameter seenParam) {
if (seenParam == param) {
foundIt = true;
}
@@ -241,14 +241,14 @@ public class TypeConstrainer {
return true;
}
JTypeParameter type1Param = type1.isTypeParameter();
com.google.gwt.core.ext.typeinfo.JTypeParameter type1Param = type1.isTypeParameter();
if (type1Param != null) {
// It would be nice to check that type1Param's bound is a match
// for type2, but that can introduce infinite recursions.
return true;
}
JTypeParameter type2Param = type2.isTypeParameter();
com.google.gwt.core.ext.typeinfo.JTypeParameter type2Param = type2.isTypeParameter();
if (type2Param != null) {
// It would be nice to check that type1Param's bound is a match
// for type2, but that can introduce infinite recursions.
@@ -332,7 +332,7 @@ public class TypeConstrainer {
public void endVisit(JWildcardType wildcardType) {
JTypeParameter newParam = new JTypeParameter("TP$"
+ freshTypeVariableCounter++, -1);
newParam.setBounds(makeArray(typeOracle.getJavaLangObject()));
newParam.setBounds(makeArray((com.google.gwt.dev.javac.typemodel.JClassType) typeOracle.getJavaLangObject()));
constraints.put(newParam, wildcardType.getUpperBound());
replacement = newParam;
}
@@ -351,7 +351,7 @@ public class TypeConstrainer {
final Map<JTypeParameter, JClassType> constraints) {
JModTypeVisitor substituter = new JModTypeVisitor() {
@Override
public void endVisit(JTypeParameter param) {
public void endVisit(com.google.gwt.core.ext.typeinfo.JTypeParameter param) {
JClassType constr = constraints.get(param);
if (constr != null) {
replacement = constr;
@@ -16,6 +16,16 @@
package de.csenk.gwt.ws.rebind.filter.serialization.com.google.gwt.user.rebind.rpc;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.IdentityHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArrayString;
import com.google.gwt.core.ext.BadPropertyValueException;
@@ -28,7 +38,6 @@ import com.google.gwt.core.ext.typeinfo.JMethod;
import com.google.gwt.core.ext.typeinfo.JParameterizedType;
import com.google.gwt.core.ext.typeinfo.JType;
import com.google.gwt.core.ext.typeinfo.TypeOracle;
import com.google.gwt.dev.javac.TypeOracleMediator;
import com.google.gwt.user.client.rpc.SerializationException;
import com.google.gwt.user.client.rpc.SerializationStreamReader;
import com.google.gwt.user.client.rpc.SerializationStreamWriter;
@@ -37,16 +46,6 @@ import com.google.gwt.user.client.rpc.impl.SerializerBase;
import com.google.gwt.user.rebind.ClassSourceFileComposerFactory;
import com.google.gwt.user.rebind.SourceWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.IdentityHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* This class generates a class with name 'typeSerializerClassName' that is able
* to serialize and deserialize a set of types into or out of a stream. The set
@@ -287,7 +286,7 @@ public class TypeSerializerCreator {
* @return
*/
private String getTypeString(JType type) {
String typeString = TypeOracleMediator.computeBinaryClassName(type) + "/"
String typeString = type.getQualifiedBinaryName() + "/"
+ SerializationUtils.getSerializationSignature(typeOracle, type);
return typeString;
}
@@ -447,7 +446,7 @@ public class TypeSerializerCreator {
}
String jsniTypeRef;
jsniTypeRef = TypeOracleMediator.computeBinaryClassName(type.getLeafType());
jsniTypeRef = type.getLeafType().getQualifiedBinaryName();
while (type.isArray() != null) {
jsniTypeRef += "[]";
type = type.isArray().getComponentType();