public static MethodLocation getMethodLocation ( final Node aNode , final Set < MethodLocation > methodLocations ) { MethodLocation toReturn = null ; if ( aNode != null && CLASS_FIELD_METHOD_ELEMENT_NAMES . contains ( aNode . getLocalName ( ) . toLowerCase ( ) ) ) { final MethodLocation validLocation = getFieldOrMethodLocationIfValid ( aNode , getContainingClassOrNull ( aNode ) , methodLocations ) ; // The MethodLocation should represent a normal getter; no arguments should be present. if ( validLocation != null && MethodLocation . NO_PARAMETERS . equalsIgnoreCase ( validLocation . getParametersAsString ( ) ) ) { toReturn = validLocation ; } } // All done. return toReturn ; }
Finds the MethodLocation within the given Set which corresponds to the supplied DOM Node .