/** Returns the implied object type, or <code>null</code>. */ public IType getImpliedObjectType() { if (astName == null) return null; IASTName name = astName; IASTNode nameParent = name.getParent(); while (nameParent instanceof IASTName) { name = (IASTName) nameParent; nameParent = name.getParent(); } final ASTNodeProperty prop = name.getPropertyInParent(); if (prop == CPPSemantics.STRING_LOOKUP_PROPERTY) { return null; } if (prop == IASTFieldReference.FIELD_NAME) { ICPPASTFieldReference fieldRef = (ICPPASTFieldReference) nameParent; return fieldRef.getFieldOwnerType(); } if (prop == IASTIdExpression.ID_NAME) { IScope scope = CPPVisitor.getContainingScope(name); if (scope instanceof ICPPClassScope) { return ((ICPPClassScope) scope).getClassType(); } return CPPVisitor.getImpliedObjectType(scope); } return null; }