public ExpressionFactory getExpressionFactory()

in core/src/main/java/org/apache/commons/jelly/parser/XMLParser.java [741:767]


    public ExpressionFactory getExpressionFactory(TagScript tagScript) {
    	// Check the tag library
    	TagLibrary tagLibrary = null;
    	if (tagScript != null)
    		tagLibrary = tagScript.getTagLibrary();

    	// If the tagScript is a StaticTag, then go up the stack looking for a
    	//	tagScript that belongs to a real TagLibrary
    	if (tagLibrary == null && tagScript instanceof StaticTagScript)
    		for (int i = tagScriptStack.size() - 1; i > -1; i--) {
    			TagScript script = (TagScript)tagScriptStack.get(i);
    			tagLibrary = script.getTagLibrary();
    			if (tagLibrary != null)
    				break;
    			if (!(script instanceof StaticTagScript))
    				break;
    		}
    	if (tagLibrary != null) {
    		ExpressionFactory factory = tagLibrary.getExpressionFactory();
    		if (factory != null)
    			return factory;
    	}
        if (expressionFactory == null) {
            expressionFactory = createExpressionFactory();
        }
        return expressionFactory;
    }