|
@@ -384,7 +384,7 @@ public class JavaNativeModule {
|
384
|
384
|
|
385
|
385
|
boolean hasConstructor = false;
|
386
|
386
|
for (java.lang.reflect.Constructor<?> constructor : cls.getConstructors()) {
|
387
|
|
- ZenCodeType.Constructor constructorAnnotation = (ZenCodeType.Constructor) constructor.getAnnotation(ZenCodeType.Constructor.class);
|
|
387
|
+ ZenCodeType.Constructor constructorAnnotation = constructor.getAnnotation(ZenCodeType.Constructor.class);
|
388
|
388
|
if (constructorAnnotation != null) {
|
389
|
389
|
ConstructorMember member = asConstructor(context, definition, constructor);
|
390
|
390
|
definition.addMember(member);
|
|
@@ -663,7 +663,8 @@ public class JavaNativeModule {
|
663
|
663
|
return name;
|
664
|
664
|
}
|
665
|
665
|
|
666
|
|
- private ConstructorMember asConstructor(TypeVariableContext context, HighLevelDefinition definition, java.lang.reflect.Constructor method) {
|
|
666
|
+ @SuppressWarnings("rawtypes")
|
|
667
|
+ private ConstructorMember asConstructor(TypeVariableContext context, HighLevelDefinition definition, java.lang.reflect.Constructor method) {
|
667
|
668
|
FunctionHeader header = getHeader(context, method);
|
668
|
669
|
return new ConstructorMember(
|
669
|
670
|
CodePosition.NATIVE,
|
|
@@ -737,7 +738,8 @@ public class JavaNativeModule {
|
737
|
738
|
return new CasterMember(CodePosition.NATIVE, definition, modifiers, toType, null);
|
738
|
739
|
}
|
739
|
740
|
|
740
|
|
- private FunctionHeader getHeader(TypeVariableContext context, java.lang.reflect.Constructor constructor) {
|
|
741
|
+ @SuppressWarnings({"rawtypes", "unchecked"})
|
|
742
|
+ private FunctionHeader getHeader(TypeVariableContext context, java.lang.reflect.Constructor constructor) {
|
741
|
743
|
return getHeader(
|
742
|
744
|
context,
|
743
|
745
|
null,
|
|
@@ -1077,7 +1079,8 @@ public class JavaNativeModule {
|
1077
|
1079
|
return org.objectweb.asm.Type.getDescriptor(cls);
|
1078
|
1080
|
}
|
1079
|
1081
|
|
1080
|
|
- private static String getMethodDescriptor(java.lang.reflect.Constructor constructor) {
|
|
1082
|
+ @SuppressWarnings("rawtypes")
|
|
1083
|
+ private static String getMethodDescriptor(java.lang.reflect.Constructor constructor) {
|
1081
|
1084
|
return org.objectweb.asm.Type.getConstructorDescriptor(constructor);
|
1082
|
1085
|
}
|
1083
|
1086
|
|
|
@@ -1085,7 +1088,8 @@ public class JavaNativeModule {
|
1085
|
1088
|
return org.objectweb.asm.Type.getMethodDescriptor(method);
|
1086
|
1089
|
}
|
1087
|
1090
|
|
1088
|
|
- private static JavaMethod getMethod(JavaClass cls, java.lang.reflect.Constructor constructor) {
|
|
1091
|
+ @SuppressWarnings("rawtypes")
|
|
1092
|
+ private static JavaMethod getMethod(JavaClass cls, java.lang.reflect.Constructor constructor) {
|
1089
|
1093
|
return new JavaMethod(
|
1090
|
1094
|
cls,
|
1091
|
1095
|
JavaMethod.Kind.CONSTRUCTOR,
|
|
@@ -1115,13 +1119,16 @@ public class JavaNativeModule {
|
1115
|
1119
|
}
|
1116
|
1120
|
|
1117
|
1121
|
private static class TypeVariableContext {
|
1118
|
|
- private final Map<TypeVariable, TypeParameter> typeVariables = new HashMap<>();
|
|
1122
|
+ @SuppressWarnings("rawtypes")
|
|
1123
|
+ private final Map<TypeVariable, TypeParameter> typeVariables = new HashMap<>();
|
1119
|
1124
|
|
1120
|
|
- public void put(TypeVariable variable, TypeParameter parameter) {
|
|
1125
|
+ @SuppressWarnings("rawtypes")
|
|
1126
|
+ public void put(TypeVariable variable, TypeParameter parameter) {
|
1121
|
1127
|
typeVariables.put(variable, parameter);
|
1122
|
1128
|
}
|
1123
|
1129
|
|
1124
|
|
- public TypeParameter get(TypeVariable variable) {
|
|
1130
|
+ @SuppressWarnings("rawtypes")
|
|
1131
|
+ public TypeParameter get(TypeVariable variable) {
|
1125
|
1132
|
if (!typeVariables.containsKey(variable))
|
1126
|
1133
|
throw new IllegalStateException("Could not find type variable " + variable.getName());
|
1127
|
1134
|
|