type cleanups
This commit is contained in:
parent
137fed6e62
commit
7a69f752d0
|
@ -1066,7 +1066,7 @@ public abstract class JDTJava2CAstTranslator<T extends Position> {
|
|||
* NOT INCLUDING first parameter 'this' (for non-static methods)
|
||||
*/
|
||||
@Override
|
||||
public List getArgumentTypes() {
|
||||
public List<CAstType> getArgumentTypes() {
|
||||
return fParameterTypes;
|
||||
}
|
||||
|
||||
|
@ -1085,13 +1085,13 @@ public abstract class JDTJava2CAstTranslator<T extends Position> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Collection getSupertypes() {
|
||||
public Collection<CAstType> getSupertypes() {
|
||||
Assertions.UNREACHABLE("CAstType.FunctionImpl#getSupertypes() called???");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection/* <CAstType> */getExceptionTypes() {
|
||||
public Collection<CAstType>/* <CAstType> */getExceptionTypes() {
|
||||
if (fExceptionTypes == null) {
|
||||
fExceptionTypes = new LinkedHashSet<CAstType>();
|
||||
if (fDecl != null)
|
||||
|
|
|
@ -122,7 +122,7 @@ public class JDTTypeDictionary extends CAstTypeDictionaryImpl {
|
|||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public Collection getSupertypes() {
|
||||
public Collection<CAstType> getSupertypes() {
|
||||
if (fEltJdtType.isPrimitive())
|
||||
return Collections.singleton(getCAstTypeFor(fAst.resolveWellKnownType("java.lang.Object")));
|
||||
// TODO: there is no '.isReference()' as in Polyglot: is this right? enum? I think if it's another array it will
|
||||
|
|
|
@ -415,7 +415,7 @@ public class JavaCAst2IRTranslator extends AstTranslator {
|
|||
return new CAstType.Class() {
|
||||
|
||||
@Override
|
||||
public Collection getSupertypes() {
|
||||
public Collection<CAstType> getSupertypes() {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ public class JavaPrimitiveTypeMap {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Collection getSupertypes() {
|
||||
public Collection<CAstType> getSupertypes() {
|
||||
return Collections.EMPTY_LIST;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -470,7 +470,7 @@ public class JSAstTranslator extends AstTranslator {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Collection getSupertypes() {
|
||||
public Collection<CAstType> getSupertypes() {
|
||||
return Collections.EMPTY_SET;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1822,10 +1822,10 @@ public abstract class AstTranslator extends CAstVisitor<AstTranslator.WalkContex
|
|||
if (yuck == 0) {
|
||||
return ((CAstType.Method)f.getType()).getDeclaringType();
|
||||
} else {
|
||||
return (CAstType) ((CAstType.Method)f.getType()).getArgumentTypes().get(yuck-1);
|
||||
return ((CAstType.Method)f.getType()).getArgumentTypes().get(yuck-1);
|
||||
}
|
||||
} else if (f.getType() instanceof CAstType.Function) {
|
||||
return (CAstType) ((CAstType.Function)f.getType()).getArgumentTypes().get(yuck);
|
||||
return ((CAstType.Function)f.getType()).getArgumentTypes().get(yuck);
|
||||
} else {
|
||||
return topType();
|
||||
}
|
||||
|
@ -3109,7 +3109,7 @@ public abstract class AstTranslator extends CAstVisitor<AstTranslator.WalkContex
|
|||
return ConditionalBranchInstruction.Operator.NE;
|
||||
|
||||
else {
|
||||
Assertions.UNREACHABLE("cannot translate " + CAstPrinter.print(op));
|
||||
assert false : "cannot translate " + CAstPrinter.print(op);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ public interface CAstType {
|
|||
*/
|
||||
String getName();
|
||||
|
||||
Collection/*<CAstType>*/ getSupertypes();
|
||||
Collection<CAstType> getSupertypes();
|
||||
|
||||
public interface Primitive extends CAstType {
|
||||
// Need anything else? The name pretty much says it all...
|
||||
|
@ -46,8 +46,8 @@ public interface CAstType {
|
|||
public interface Function extends Reference {
|
||||
CAstType getReturnType();
|
||||
|
||||
List/*<CAstType>*/ getArgumentTypes();
|
||||
Collection/*<CAstType>*/ getExceptionTypes();
|
||||
List<CAstType> getArgumentTypes();
|
||||
Collection<CAstType> getExceptionTypes();
|
||||
|
||||
int getArgumentCount();
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ public interface CAstType {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Collection/*<CAstType>*/ getSupertypes() {
|
||||
public Collection<CAstType>/*<CAstType>*/ getSupertypes() {
|
||||
return Collections.EMPTY_SET;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue