*
* @return the parameter element representing the parameter to which the value of the right
* operand will be bound
*/
protected ParameterElement getPropagatedParameterElementForRightHandSide() {
ExecutableElement executableElement = null;
if (propagatedElement != null) {
executableElement = propagatedElement;
} else {
if (leftHandSide instanceof Identifier) {
Identifier identifier = (Identifier) leftHandSide;
Element leftElement = identifier.getPropagatedElement();
if (leftElement instanceof ExecutableElement) {
executableElement = (ExecutableElement) leftElement;
}
}
if (leftHandSide instanceof PropertyAccess) {
SimpleIdentifier identifier = ((PropertyAccess) leftHandSide).getPropertyName();
Element leftElement = identifier.getPropagatedElement();
if (leftElement instanceof ExecutableElement) {
executableElement = (ExecutableElement) leftElement;
}
}
}
if (executableElement == null) {
return null;
}
ParameterElement[] parameters = executableElement.getParameters();
if (parameters.length < 1) {
return null;
}
return parameters[0];
}