|
@@ -81,6 +81,7 @@ public class JavaNativeModule {
|
81
|
81
|
private final Map<Class<?>, HighLevelDefinition> definitionByClass = new HashMap<>();
|
82
|
82
|
private final Map<Class<?>, TypeID> typeByClass = new HashMap<>();
|
83
|
83
|
private final Map<Class<?>, TypeID> unsignedByClass = new HashMap<>();
|
|
84
|
+ private final TypeVariableContext context = new TypeVariableContext();
|
84
|
85
|
|
85
|
86
|
public final Map<String, ISymbol> globals = new HashMap<>();
|
86
|
87
|
private BracketExpressionParser bep;
|
|
@@ -161,7 +162,7 @@ public class JavaNativeModule {
|
161
|
162
|
JavaClass jcls = JavaClass.fromInternalName(getInternalName(cls), JavaClass.Kind.CLASS);
|
162
|
163
|
compiled.setClassInfo(definition, jcls);
|
163
|
164
|
StoredType thisType = registry.getForMyDefinition(definition).stored();
|
164
|
|
- TypeVariableContext context = new TypeVariableContext();
|
|
165
|
+ //TypeVariableContext context = new TypeVariableContext();
|
165
|
166
|
|
166
|
167
|
for (Field field : cls.getDeclaredFields()) {
|
167
|
168
|
if (!field.isAnnotationPresent(ZenCodeGlobals.Global.class))
|
|
@@ -207,7 +208,7 @@ public class JavaNativeModule {
|
207
|
208
|
HighLevelDefinition definition = addClass(method.getDeclaringClass());
|
208
|
209
|
JavaClass jcls = JavaClass.fromInternalName(getInternalName(method.getDeclaringClass()), JavaClass.Kind.CLASS);
|
209
|
210
|
|
210
|
|
- TypeVariableContext context = new TypeVariableContext();
|
|
211
|
+ //TypeVariableContext context = new TypeVariableContext();
|
211
|
212
|
MethodMember methodMember = new MethodMember(CodePosition.NATIVE, definition, Modifiers.PUBLIC | Modifiers.STATIC, method.getName(), getHeader(context, method), null);
|
212
|
213
|
definition.addMember(methodMember);
|
213
|
214
|
boolean isGenericResult = methodMember.header.getReturnType().isGeneric();
|
|
@@ -298,7 +299,7 @@ public class JavaNativeModule {
|
298
|
299
|
//Moved up here so that circular dependencies are caught (hopefully)
|
299
|
300
|
definitionByClass.put(cls, definition);
|
300
|
301
|
|
301
|
|
- TypeVariableContext context = new TypeVariableContext();
|
|
302
|
+ //TypeVariableContext context = new TypeVariableContext();
|
302
|
303
|
TypeVariable<Class<T>>[] javaTypeParameters = cls.getTypeParameters();
|
303
|
304
|
TypeParameter[] typeParameters = new TypeParameter[cls.getTypeParameters().length];
|
304
|
305
|
definition.typeParameters = typeParameters;
|
|
@@ -457,7 +458,7 @@ public class JavaNativeModule {
|
457
|
458
|
if(methodAnnotation != null) {
|
458
|
459
|
String name = !methodAnnotation.value().isEmpty() ? methodAnnotation.value() : method.getName();
|
459
|
460
|
|
460
|
|
- TypeVariableContext context = new TypeVariableContext();
|
|
461
|
+ //TypeVariableContext context = new TypeVariableContext();
|
461
|
462
|
|
462
|
463
|
final Parameter[] parameters = getExpansionParameters(method);
|
463
|
464
|
|
|
@@ -476,7 +477,7 @@ public class JavaNativeModule {
|
476
|
477
|
if (implicit) {
|
477
|
478
|
modifiers |= Modifiers.IMPLICIT;
|
478
|
479
|
}
|
479
|
|
- TypeVariableContext context = new TypeVariableContext();
|
|
480
|
+ //TypeVariableContext context = new TypeVariableContext();
|
480
|
481
|
StoredType toType = loadStoredType(context, method.getAnnotatedReturnType());
|
481
|
482
|
final CasterMember member = new CasterMember(CodePosition.NATIVE, expansion, modifiers, toType, null);
|
482
|
483
|
|
|
@@ -807,7 +808,7 @@ public class JavaNativeModule {
|
807
|
808
|
Parameter parameter = javaParameters[i];
|
808
|
809
|
|
809
|
810
|
//AnnotatedType parameterType = parameter.getAnnotatedType();
|
810
|
|
- StoredType type = loadStoredType(context, parameter);
|
|
811
|
+ StoredType type = loadStoredType(context, parameter);
|
811
|
812
|
Expression defaultValue = getDefaultValue(parameter, type);
|
812
|
813
|
parameters[i] = new FunctionParameter(type, parameter.getName(), defaultValue, parameter.isVarArgs());
|
813
|
814
|
}
|
|
@@ -957,7 +958,7 @@ public class JavaNativeModule {
|
957
|
958
|
}
|
958
|
959
|
|
959
|
960
|
private <T> TypeVariableContext convertTypeParameters(Class<T> cls) {
|
960
|
|
- TypeVariableContext context = new TypeVariableContext();
|
|
961
|
+ //TypeVariableContext context = new TypeVariableContext();
|
961
|
962
|
TypeVariable<Class<T>>[] javaTypeParameters = cls.getTypeParameters();
|
962
|
963
|
TypeParameter[] typeParameters = new TypeParameter[cls.getTypeParameters().length];
|
963
|
964
|
|