private void checkForFinal(final Expression expression, VariableExpression ve) {
        Variable v = ve.getAccessedVariable();
        boolean isFinal = isFinal(v.getModifiers());
        boolean isParameter = v instanceof Parameter;
        if (isFinal && isParameter) {
            addError("Cannot assign a value to final variable '" + v.getName() + "'", expression);
        }
    }
private void checkForFinal ( final Expression expression , VariableExpression ve ) { Variable v = ve . getAccessedVariable ( ) ; boolean isFinal = isFinal ( v . getModifiers ( ) ) ; boolean isParameter = v instanceof Parameter ; if ( isFinal && isParameter ) { addError ( "Cannot assign a value to final variable '" + v . getName ( ) + "'" , expression ) ; } }
TODO handle local variables