public String getOperatorFunctionModifier ( Expression expr ) { VariableElement var = TreeUtil . getVariableElement ( expr ) ; if ( var == null ) { assert TreeUtil . trimParentheses ( expr ) instanceof ArrayAccess : "Expression cannot be resolved to a variable or array access." ; return "Array" ; } String modifier = "" ; if ( ElementUtil . isVolatile ( var ) ) { modifier += "Volatile" ; } if ( ! ElementUtil . isWeakReference ( var ) && ( var . getKind ( ) . isField ( ) || options . useARC ( ) ) ) { modifier += "Strong" ; } return modifier ; }
Returns the modifier for an assignment expression being converted to a function . The result will be Array if the lhs is an array access Strong if the lhs is a field with a strong reference and an empty string for local variables and weak fields .