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));
        }
    }
public ResolvedType getTypeOfThisIn(Node node) {
        
        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));
        }
    }
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 ) ) ; } }
"this" inserted in the given point, which type would have?
this inserted in the given point which type would have?