use of abs.frontend.typechecker.InterfaceType in project abstools by abstools.
the class TypeHierarchyContentProvider method getElements.
@Override
public Object[] getElements(Object inputElement) {
if (inputElement instanceof Type) {
Type type = (Type) inputElement;
if (type.getDecl() != null) {
return new Object[] { type.getDecl() };
}
if (type instanceof UnionType) {
UnionType unionType = (UnionType) type;
java.util.List<Object> result = new ArrayList<Object>();
for (InterfaceType t : unionType.getTypes()) {
for (Object e : getElements(t)) {
result.add(e);
}
}
return result.toArray();
}
}
return nothing;
}
Aggregations