add Generics to amapframework