Add support for class member variable

supersedes #1417
Do you mean that tree.typeAnnotation could be null ? If this is the case, should the code take the if branch