mirror of
https://github.com/moparisthebest/fernflower
synced 2024-11-23 09:42:18 -05:00
single "extends Object" omitted for type parameters
This commit is contained in:
parent
6c2cc096fb
commit
310058e6eb
@ -418,13 +418,16 @@ public class ClassWriter {
|
|||||||
if(i>0) {
|
if(i>0) {
|
||||||
writer.write(", ");
|
writer.write(", ");
|
||||||
}
|
}
|
||||||
writer.write(descriptor.fparameters.get(i)+" extends ");
|
writer.write(descriptor.fparameters.get(i));
|
||||||
|
|
||||||
List<GenericType> lstBounds = descriptor.fbounds.get(i);
|
List<GenericType> lstBounds = descriptor.fbounds.get(i);
|
||||||
|
if (lstBounds.size() > 1 || !"java/lang/Object".equals(lstBounds.get(0).value)) {
|
||||||
|
writer.write(" extends ");
|
||||||
writer.write(GenericMain.getGenericCastTypeName(lstBounds.get(0)));
|
writer.write(GenericMain.getGenericCastTypeName(lstBounds.get(0)));
|
||||||
|
|
||||||
for(int j=1;j<lstBounds.size();j++) {
|
for(int j=1;j<lstBounds.size();j++) {
|
||||||
writer.write(" & " + GenericMain.getGenericCastTypeName(lstBounds.get(j)));
|
writer.write(" & " + GenericMain.getGenericCastTypeName(lstBounds.get(j)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
writer.write(">");
|
writer.write(">");
|
||||||
@ -819,13 +822,16 @@ public class ClassWriter {
|
|||||||
if(i>0) {
|
if(i>0) {
|
||||||
bufstrwriter.write(", ");
|
bufstrwriter.write(", ");
|
||||||
}
|
}
|
||||||
bufstrwriter.write(descriptor.fparameters.get(i)+" extends ");
|
bufstrwriter.write(descriptor.fparameters.get(i));
|
||||||
|
|
||||||
List<GenericType> lstBounds = descriptor.fbounds.get(i);
|
List<GenericType> lstBounds = descriptor.fbounds.get(i);
|
||||||
|
if (lstBounds.size() > 1 || !"java/lang/Object".equals(lstBounds.get(0).value)) {
|
||||||
|
bufstrwriter.write(" extends ");
|
||||||
bufstrwriter.write(GenericMain.getGenericCastTypeName(lstBounds.get(0)));
|
bufstrwriter.write(GenericMain.getGenericCastTypeName(lstBounds.get(0)));
|
||||||
|
|
||||||
for(int j=1;j<lstBounds.size();j++) {
|
for(int j=1;j<lstBounds.size();j++) {
|
||||||
bufstrwriter.write(" & " + GenericMain.getGenericCastTypeName(lstBounds.get(j)));
|
bufstrwriter.write(" & " + GenericMain.getGenericCastTypeName(lstBounds.get(j)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bufstrwriter.write("> ");
|
bufstrwriter.write("> ");
|
||||||
|
Loading…
Reference in New Issue
Block a user