Environment env = (Environment)local;
HaxeType thisType = (HaxeType)env.get("this");
// only classes can have type params
if (thisType instanceof Class)
{
Class cclass = (Class)thisType;
// 1. search in current class type params
for (HaxeType type : cclass.getParameterTypes())
{
if (type.getText().equals(shortTypeName))
{
return type;
}