forked from JavaTX/JavaCompilerCore
Bug 112 gefixt
This commit is contained in:
parent
2add9f518c
commit
d3d1d658b8
@ -231,8 +231,15 @@ public class Signature {
|
|||||||
private void createSigForParamTypeWithWC(RefType ref) {
|
private void createSigForParamTypeWithWC(RefType ref) {
|
||||||
for(RefTypeOrTPHOrWildcardOrGeneric p : ref.getParaList()) {
|
for(RefTypeOrTPHOrWildcardOrGeneric p : ref.getParaList()) {
|
||||||
if(p instanceof WildcardType) {
|
if(p instanceof WildcardType) {
|
||||||
|
String name = null;
|
||||||
if(((WildcardType) p).getInnerType() instanceof GenericRefType) {
|
if(((WildcardType) p).getInnerType() instanceof GenericRefType) {
|
||||||
String name = new TypeToSignature().visit((GenericRefType)((WildcardType) p).getInnerType());
|
name = new TypeToSignature().visit((GenericRefType)((WildcardType) p).getInnerType());
|
||||||
|
}
|
||||||
|
if(((WildcardType) p).getInnerType() instanceof TypePlaceholder) {
|
||||||
|
name = new TypeToSignature().visit((TypePlaceholder)((WildcardType) p).getInnerType());
|
||||||
|
name = name.substring(1);
|
||||||
|
}
|
||||||
|
if(name != null) {
|
||||||
if(!genericsAndBoundsMethod.containsKey(name) && !genericsAndBounds.containsKey(name)) {
|
if(!genericsAndBoundsMethod.containsKey(name) && !genericsAndBounds.containsKey(name)) {
|
||||||
sw.visitFormalTypeParameter(name);
|
sw.visitFormalTypeParameter(name);
|
||||||
sw.visitClassBound().visitClassType(Type.getInternalName(Object.class));
|
sw.visitClassBound().visitClassType(Type.getInternalName(Object.class));
|
||||||
|
@ -48,7 +48,10 @@ public class TypeToSignature implements TypeVisitor<String> {
|
|||||||
@Override
|
@Override
|
||||||
public String visit(SuperWildcardType superWildcardType) {
|
public String visit(SuperWildcardType superWildcardType) {
|
||||||
// throw new NotImplementedException();
|
// throw new NotImplementedException();
|
||||||
return "-" + superWildcardType.getInnerType().acceptTV(new TypeToSignature());
|
String sig = "-" + superWildcardType.getInnerType().acceptTV(new TypeToSignature());
|
||||||
|
if(superWildcardType.getInnerType() instanceof TypePlaceholder)
|
||||||
|
sig += ";";
|
||||||
|
return sig;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -60,7 +63,10 @@ public class TypeToSignature implements TypeVisitor<String> {
|
|||||||
@Override
|
@Override
|
||||||
public String visit(ExtendsWildcardType extendsWildcardType) {
|
public String visit(ExtendsWildcardType extendsWildcardType) {
|
||||||
// throw new NotImplementedException();
|
// throw new NotImplementedException();
|
||||||
return "+" + extendsWildcardType.getInnerType().acceptTV(new TypeToSignature());
|
String sig = "+" + extendsWildcardType.getInnerType().acceptTV(new TypeToSignature());
|
||||||
|
if(extendsWildcardType.getInnerType() instanceof TypePlaceholder)
|
||||||
|
sig += ";";
|
||||||
|
return sig;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user