|
@@ -173,6 +173,8 @@ public class JavaDefinitionVisitor implements DefinitionVisitor<byte[]> {
|
173
|
173
|
final JavaClass toClass = variant.getTag(JavaClass.class);
|
174
|
174
|
final JavaClassWriter writer = new JavaClassWriter(ClassWriter.COMPUTE_FRAMES);
|
175
|
175
|
|
|
176
|
+ final String variantName = variant.name;
|
|
177
|
+
|
176
|
178
|
|
177
|
179
|
final String ss = "<" + javaTypeGenericVisitor.getGenericSignature(variant.genericParameters) + ">Ljava/lang/Object;";
|
178
|
180
|
JavaClassWriter.registerSuperClass(variantName, "java/lang/Object");
|
|
@@ -187,6 +189,7 @@ public class JavaDefinitionVisitor implements DefinitionVisitor<byte[]> {
|
187
|
189
|
for (final VariantDefinition.Option option : options) {
|
188
|
190
|
JavaVariantOption optionTag = option.getTag(JavaVariantOption.class);
|
189
|
191
|
final JavaClassWriter optionWriter = new JavaClassWriter(ClassWriter.COMPUTE_FRAMES);
|
|
192
|
+ final String optionClassName = variantName + "$" + option.name;
|
190
|
193
|
JavaClassWriter.registerSuperClass(optionClassName, variantName);
|
191
|
194
|
|
192
|
195
|
writer.visitInnerClass(optionTag.variantOptionClass.internalName, optionTag.variantClass.internalName, option.name, Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL);
|
|
@@ -232,7 +235,7 @@ public class JavaDefinitionVisitor implements DefinitionVisitor<byte[]> {
|
232
|
235
|
final String descriptor = context.getDescriptor(types[i]);
|
233
|
236
|
optionInitDescBuilder.append(descriptor);
|
234
|
237
|
optionInitSignatureBuilder.append("T").append(((GenericTypeID) types[i]).parameter.name).append(";");
|
235
|
|
- optionWriter.visitField(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "Field" + i, descriptor, "T" + ((GenericTypeID) types[i]).parameter.name + ";", null).visitEnd();
|
|
238
|
+ optionWriter.visitField(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "field" + i, descriptor, "T" + ((GenericTypeID) types[i]).parameter.name + ";", null).visitEnd();
|
236
|
239
|
}
|
237
|
240
|
optionInitDescBuilder.append(")V");
|
238
|
241
|
optionInitSignatureBuilder.append(")V");
|