Typescript Get Type From Array Of Pointers In Java