we can do something like
type = ...
while (type instanceof ArrayType) {
type = ((ArrayType) type).getElementType()
}
if (type instanceof ObjectType) {...}
this needs to be done for field type, method return and argument types, and constant instructions