private void handleMatch() { if (LocationUtils.isDefaultLocationName(m_currentLocation)) { m_matchedDefinitionAtDefaultLocation = m_currentDefinition; } if (m_location.equals(m_currentLocation)) { m_matchedDefinitionAtGivenLocation = m_currentDefinition; } }
private boolean shouldTryToMatch() { if (LocationUtils.isDefaultLocationName(m_currentLocation)) { // We're currently processing a definition at the default location, // try to match if we don't already have a definition here return m_matchedDefinitionAtDefaultLocation == null; } else if (m_location.equals(m_currentLocation)) { // We're currently processing a definition at the target location, // try to match if we don't already have a definition here return m_matchedDefinitionAtGivenLocation == null; } else { // We're not interested in definitions at this location return false; } }