Parses out a set of configured esper statement listeners.

@param element
the esper listeners element
@param parserContext
the parser's current context
@return a list of configured esper statement listeners
196550
@SuppressWarnings("unchecked")
    public ManagedSet parseListeners(Element element, ParserContext parserContext) {
        ManagedSet listeners = new ManagedSet();
        NodeList childNodes = element.getChildNodes();
        for (int i = 0; i < childNodes.getLength(); i++) {
            Node child = childNodes.item(i);
            if (child.getNodeType() == Node.ELEMENT_NODE) {
                Element childElement = (Element) child;
                String localName = child.getLocalName();
                if ("bean".equals(localName)) {
                    BeanDefinitionHolder holder = parserContext.getDelegate().parseBeanDefinitionElement(childElement);
                    parserContext.registerBeanComponent(new BeanComponentDefinition(holder));
                    listeners.add(new RuntimeBeanReference(holder.getBeanName()));
                } else if ("ref".equals(localName)) {
                    String ref = childElement.getAttribute("bean");
                    listeners.add(new RuntimeBeanReference(ref));
                }
            }
        }
        return listeners;
    }
713043
public static List<ExecutableElement>
            constructorsIn(Iterable<? extends Element> elements) {
        return listFilter(elements, CONSTRUCTOR_KIND, ExecutableElement.class);
    }
822391
public static List<ModelAnnotation> buildAnnotationList(final Element element, final AnnotationFilter filter) {
		final List<ModelAnnotation> annotationList=new ArrayList<>();
		
		forEachAnnotations(element, filter, new AnnotationFoundListener() {

			@Override
			public void onAcceptAnnotation(Element executableMethod, String annotationClassName, Map<String, String> attributes) {
				ModelAnnotation annotation = new ModelAnnotation(annotationClassName, attributes);
				
				annotationList.add(annotation);
			}
		});
		
		return annotationList;
	}
1259479
public void parseEndpointConfiguration(BeanDefinitionBuilder endpointConfiguration, Element element) {
        JdbcServerConfiguration serverConfiguration = new JdbcServerConfiguration();

        if (element.hasAttribute("host")) {
            serverConfiguration.setHost(element.getAttribute("host"));
        }

        if (element.hasAttribute("port")) {
            serverConfiguration.setPort(Integer.valueOf(element.getAttribute("port")));
        }

        if (element.hasAttribute("database-name")) {
            serverConfiguration.setDatabaseName(element.getAttribute("database-name"));
        }

        if (element.hasAttribute("max-connections")) {
            serverConfiguration.setMaxConnections(Integer.valueOf(element.getAttribute("max-connections")));
        }

        endpointConfiguration.addPropertyValue("serverConfiguration", serverConfiguration);

        BeanDefinitionParserUtils.setPropertyValue(endpointConfiguration, element.getAttribute("timeout"), "timeout");

        BeanDefinitionParserUtils.setPropertyValue(endpointConfiguration, element.getAttribute("auto-connect"), "autoConnect");
        BeanDefinitionParserUtils.setPropertyValue(endpointConfiguration, element.getAttribute("auto-create-statement"), "autoCreateStatement");
        BeanDefinitionParserUtils.setPropertyValue(endpointConfiguration, element.getAttribute("auto-transaction-handling"), "autoTransactionHandling");

        BeanDefinitionParserUtils.setPropertyReference(endpointConfiguration, element.getAttribute("auto-handle-queries"), "autoHandleQueries");

        BeanDefinitionParserUtils.setPropertyValue(endpointConfiguration, element.getAttribute("polling-interval"), "pollingInterval");
        BeanDefinitionParserUtils.setPropertyReference(endpointConfiguration, element.getAttribute("message-correlator"), "correlator");
    }
929220
protected void parseProcessEnginePlugin(Element element, List<ProcessEnginePluginXml> plugins) {

    ProcessEnginePluginXmlImpl plugin = new ProcessEnginePluginXmlImpl();

    Map<String, String> properties = new HashMap<String, String>();

    for (Element childElement : element.elements()) {
      if(PLUGIN_CLASS.equals(childElement.getTagName())) {
        plugin.setPluginClass(childElement.getText());

      } else if(PROPERTIES.equals(childElement.getTagName())) {
        parseProperties(childElement, properties);

      }

    }

    plugin.setProperties(properties);
    plugins.add(plugin);
  }
521434
protected Element[] calculateArgs(Context context)
			throws EvaluationException {

		Element[] results = new Element[ops.length];
		for (int i = 0; i < ops.length; i++) {
			results[i] = ops[i].execute(context);
		}

		return results;
	}
177167
@Override
    public void parse(ParseContext context)
            throws MonetaryParseException {
        if (!context.consume(token)) {
            throw new MonetaryParseException(context.getOriginalInput(),
                    context.getErrorIndex());
        }
    }
72274
public static List<ExecutableElement>
            methodsIn(Iterable<? extends Element> elements) {
        return listFilter(elements, METHOD_KIND, ExecutableElement.class);
    }
1199633
public static QueryExprListener listener(QueryParser parser) {
        QueryExprListener listener = listener();
        parser.addParseListener(listener);
        return listener;
    }
629173
public void parseEndpointConfiguration(BeanDefinitionBuilder endpointConfiguration, Element element) {
        BeanDefinitionParserUtils.setPropertyValue(endpointConfiguration, element.getAttribute("timeout"), "timeout");

        BeanDefinitionParserUtils.setPropertyValue(endpointConfiguration, element.getAttribute("host"), "host");
        BeanDefinitionParserUtils.setPropertyValue(endpointConfiguration, element.getAttribute("port"), "port");
        BeanDefinitionParserUtils.setPropertyValue(endpointConfiguration, element.getAttribute("binding"), "binding");

        BeanDefinitionParserUtils.setPropertyValue(endpointConfiguration, element.getAttribute("polling-interval"), "pollingInterval");
        BeanDefinitionParserUtils.setPropertyReference(endpointConfiguration, element.getAttribute("message-converter"), "messageConverter");
    }
242592
protected void parseProperties(Element element, Map<String, String> properties) {

    for (Element childElement : element.elements()) {
      if(PROPERTY.equals(childElement.getTagName())) {
        String resolved = PropertyHelper.resolveProperty(System.getProperties(), childElement.getText());
        properties.put(childElement.attribute(NAME), resolved);
      }
    }

  }
1071023
protected void parseJobExecutor(Element element, JobExecutorXmlImpl jobExecutorXml) {

    List<JobAcquisitionXml> jobAcquisitions = new ArrayList<JobAcquisitionXml>();
    Map<String, String> properties = new HashMap<String, String>();

    for (Element childElement : element.elements()) {

      if(JOB_ACQUISITION.equals(childElement.getTagName())) {
        parseJobAcquisition(childElement, jobAcquisitions);

      }else if(PROPERTIES.equals(childElement.getTagName())){
        parseProperties(childElement, properties);
      }

    }

    jobExecutorXml.setJobAcquisitions(jobAcquisitions);
    jobExecutorXml.setProperties(properties);

  }
125660
public ActivityImpl parseTask(Element taskElement, ScopeImpl scope) {
    ActivityImpl activity = createActivityOnScope(taskElement, scope);
    activity.setActivityBehavior(new TaskActivityBehavior());

    parseAsynchronousContinuationForActivity(taskElement, activity);

    parseExecutionListenersOnScope(taskElement, activity);

    for (BpmnParseListener parseListener : parseListeners) {
      parseListener.parseTask(taskElement, scope, activity);
    }
//    createMessageJobDeclForAsyncActivity(activity, true);
    return activity;
  }
999426
protected void parseProcessEnginePlugins(Element element, List<ProcessEnginePluginXml> plugins) {
    for (Element chidElement : element.elements()) {
      if(PLUGIN.equals(chidElement.getTagName())) {
        parseProcessEnginePlugin(chidElement, plugins);
      }
    }
  }
329393
private void registerJsonSchemaRepository(Element element, ParserContext parserContext) {
        BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(JsonSchemaRepository.class);
        addLocationsToBuilder(element, builder);
        parseSchemasElement(element, builder, parserContext);
        parserContext.getRegistry().registerBeanDefinition(element.getAttribute(ID), builder.getBeanDefinition());
    }
920466
private BeanDefinition parseActionCondition(Element element, ParserContext parserContext) {
        Map<String, BeanDefinitionParser> actionRegistry = TestActionRegistry.getRegisteredActionParser();

        Element action = DOMUtil.getFirstChildElement(element);
        if (action != null) {
            BeanDefinitionParser parser = actionRegistry.get(action.getTagName());

            if (parser !=  null) {
                return parser.parse(action, parserContext);
            } else {
                return parserContext.getReaderContext().getNamespaceHandlerResolver().resolve(action.getNamespaceURI()).parse(action, parserContext);
            }
        }

        throw new BeanCreationException("Invalid wait for action condition - action not set properly");
    }
242718
public static Map<String, String> retrieveContextParam(Element element) {
        Map<String, String> contextParams = new HashMap<String, String>();
        NodeList elementsByTagName = element.getElementsByTagNameNS("*", "context-param");
        for (int i = 0; i < elementsByTagName.getLength(); i++) {
            Element subElement = (Element) elementsByTagName.item(i);
            contextParams.put(retrieveNodeValude(subElement, "param-name"),
                retrieveNodeValude(subElement, "param-value"));
        }
        return contextParams;
    }