private ResolvedType solveDotExpressionType(ResolvedReferenceTypeDeclaration parentType, FieldAccessExpr node) {
        // Fields and internal type declarations cannot have the same name.
        // Thus, these checks will always be mutually exclusive.
        if (parentType.hasField(node.getName().getId())) {
            return parentType.getField(node.getName().getId()).getType();
        } else if (parentType.hasInternalType(node.getName().getId())) {
            return new ReferenceTypeImpl(parentType.getInternalType(node.getName().getId()), typeSolver);
        } else {
            throw new UnsolvedSymbolException(node.getName().getId());
        }
    }
private ResolvedType solveDotExpressionType(ResolvedReferenceTypeDeclaration parentType, FieldAccessExpr node) {
        
        
        if (parentType.hasField(node.getName().getId())) {
            return parentType.getField(node.getName().getId()).getType();
        } else if (parentType.hasInternalType(node.getName().getId())) {
            return new ReferenceTypeImpl(parentType.getInternalType(node.getName().getId()), typeSolver);
        } else {
            throw new UnsolvedSymbolException(node.getName().getId());
        }
    }
private ResolvedType solveDotExpressionType ( ResolvedReferenceTypeDeclaration parentType , FieldAccessExpr node ) { // Fields and internal type declarations cannot have the same name. // Thus, these checks will always be mutually exclusive. if ( parentType . hasField ( node . getName ( ) . getId ( ) ) ) { return parentType . getField ( node . getName ( ) . getId ( ) ) . getType ( ) ; } else if ( parentType . hasInternalType ( node . getName ( ) . getId ( ) ) ) { return new ReferenceTypeImpl ( parentType . getInternalType ( node . getName ( ) . getId ( ) ) , typeSolver ) ; } else { throw new UnsolvedSymbolException ( node . getName ( ) . getId ( ) ) ; } }
Java Parser can't differentiate between packages, internal types, and fields.
All three are lumped together into FieldAccessExpr. We need to differentiate them.
Java Parser can t differentiate between packages internal types and fields . All three are lumped together into FieldAccessExpr . We need to differentiate them .