code: public ResolvedType getTypeOfThisIn(Node node) {
          // TODO consider static methods
          if (node instanceof ClassOrInterfaceDeclaration) {
              return new ReferenceTypeImpl(getTypeDeclaration((ClassOrInterfaceDeclaration) node), typeSolver);
          } else if (node instanceof EnumDeclaration) {
              JavaParserEnumDeclaration enumDeclaration = new JavaParserEnumDeclaration((EnumDeclaration) node, typeSolver);
              return new ReferenceTypeImpl(enumDeclaration, typeSolver);
          } else if (node instanceof ObjectCreationExpr && ((ObjectCreationExpr) node).getAnonymousClassBody().isPresent()) {
              JavaParserAnonymousClassDeclaration anonymousDeclaration = new JavaParserAnonymousClassDeclaration((ObjectCreationExpr) node, typeSolver);
              return new ReferenceTypeImpl(anonymousDeclaration, typeSolver);
          } else {
              return getTypeOfThisIn(getParentNode(node));
          }
      }
docs: "this" inserted in the given point, which type would have?