java.lang.String in signature should serialized and mapped back to java.lang.String
This commit is contained in:
+6
-4
@@ -3,7 +3,6 @@ package org.jetbrains.jet.lang.resolve.java;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor;
|
||||
import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetStandardClasses;
|
||||
import org.jetbrains.jet.lang.types.JetStandardLibrary;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
@@ -73,12 +72,15 @@ public abstract class JetTypeJetSignatureReader extends JetSignatureExceptionsAd
|
||||
private List<TypeProjection> typeArguments;
|
||||
|
||||
@Override
|
||||
public void visitClassType(String name, boolean nullable) {
|
||||
public void visitClassType(String name, boolean nullable, boolean forceReal) {
|
||||
String ourName = name.replace('/', '.');
|
||||
|
||||
this.classDescriptor = this.javaSemanticServices.getTypeTransformer().getPrimitiveWrappersClassDescriptorMap().get(ourName);
|
||||
this.classDescriptor = null;
|
||||
if (this.classDescriptor == null && !forceReal) {
|
||||
this.classDescriptor = this.javaSemanticServices.getTypeTransformer().getPrimitiveWrappersClassDescriptorMap().get(ourName);
|
||||
}
|
||||
|
||||
if (this.classDescriptor == null && ourName.equals("java.lang.Object")) {
|
||||
if (this.classDescriptor == null && ourName.equals("java.lang.Object") && !forceReal) {
|
||||
this.classDescriptor = JetStandardClasses.getAny();
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,12 @@ public class JvmClassName {
|
||||
public JvmClassName(@NotNull String fqName) {
|
||||
this.fqName = fqName;
|
||||
}
|
||||
|
||||
public static JvmClassName byInternalName(@NotNull String internalName) {
|
||||
JvmClassName r = new JvmClassName(internalName.replace('/', '.'));
|
||||
r.internalName = internalName;
|
||||
return r;
|
||||
}
|
||||
|
||||
public String getFqName() {
|
||||
return fqName;
|
||||
|
||||
@@ -108,4 +108,9 @@ public enum JvmPrimitiveType {
|
||||
public static JvmPrimitiveType getByWrapperAsmType(Type type) {
|
||||
return MapByWrapperAsmTypeHolder.map.get(type);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static JvmPrimitiveType getByWrapperClass(JvmClassName className) {
|
||||
return getByWrapperAsmType(className.getAsmType());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user