Package de.odysseus.el.tree

Examples of de.odysseus.el.tree.TreeStore


        throw new ELException("Cannot parse EL property javax.el.cacheSize", e);
      }
    }
    Cache cache = cacheSize > 0 ? new Cache(cacheSize) : null;

    return new TreeStore(builder, cache);
  }
View Full Code Here


    // create our customized builder
    TreeBuilder builder = new Builder(Builder.Feature.METHOD_INVOCATIONS);

    // create our factory which uses our customized builder
    ExpressionFactory f = new ExpressionFactoryImpl(new TreeStore(builder, new Cache(10)));

    // create our resolver
    ELResolver resolver = new MethodResolver(method);

    // create our context
View Full Code Here

  public static void main(String... args) throws NoSuchMethodException {
    // create our customized builder
    TreeBuilder builder = new Builder(Builder.Feature.NULL_PROPERTIES);

    // create our factory which uses our customized builder
    ExpressionFactory f = new ExpressionFactoryImpl(new TreeStore(builder, new Cache(10)));

    // create our context
    ELContext context = new SimpleContext();

    // create our expression we want to evaluate
View Full Code Here

        throw new ELException("Cannot parse EL property javax.el.cacheSize", e);
      }
    }
    Cache cache = cacheSize > 0 ? new Cache(cacheSize) : null;

    return new TreeStore(builder, cache);
  }
View Full Code Here

    context.getELResolver().setValue(context, null, "property_long_1", 1l);
    context.getELResolver().setValue(context, null, "indentifier_string", "bar"); // shadowed by variable indentifier_string
    context.getELResolver().setValue(context, null, "property_method_1", getClass().getMethod("method_1"));

    // var_var_long_1 --> var_long_1, var_property_long_1 --> property_long_1
    context.setVariable("var_var_long_1", new TreeValueExpression(new TreeStore(BUILDER, null), null, context.getVariableMapper(), "${var_long_1}", long.class))
    context.setVariable("var_property_long_1", new TreeValueExpression(new TreeStore(BUILDER, null), null, context.getVariableMapper(), "${property_long_1}", long.class))
  }
View Full Code Here

import de.odysseus.el.tree.TreeStore;
import de.odysseus.el.tree.impl.Cache;

public class TreeStoreTest extends TestCase {
  public void test() {
    TreeStore store = new TreeStore(BUILDER, new Cache(1));
    assertSame(BUILDER, store.getBuilder());

    Tree tree = store.get("1");
    assertNotNull(tree);
    assertSame(tree, store.get("1"));
  }
View Full Code Here

    context.getELResolver().setValue(context, null, "property_long_1", 1l);
    context.getELResolver().setValue(context, null, "indentifier_string", "bar"); // shadowed by variable indentifier_string
    context.getELResolver().setValue(context, null, "property_method_1", getClass().getMethod("method_1"));

    // var_var_long_1 --> var_long_1, var_property_long_1 --> property_long_1
    context.setVariable("var_var_long_1", new TreeValueExpression(new TreeStore(BUILDER, null), null, context.getVariableMapper(), null, "${var_long_1}", long.class))
    context.setVariable("var_property_long_1", new TreeValueExpression(new TreeStore(BUILDER, null), null, context.getVariableMapper(), null, "${property_long_1}", long.class))
  }
View Full Code Here

    };
  }
 
 
  private ExpressionFactory newExpressionFactory(CacheProvider cacheProvider) {
    TreeStore store = new TreeStore(new Builder(), createTreeCache(cacheProvider));
    return new ExpressionFactoryImpl(store, typeConverter);
  }
View Full Code Here

    /** Returns an <code>ExpressionFactory</code> instance.
     * @return A customized <code>ExpressionFactory</code> instance
     */
    public static ExpressionFactory newExpressionFactory() {
        return new ExpressionFactoryImpl(new TreeStore(new ExtendedBuilder(), new Cache(1000)));
    }
View Full Code Here

        throw new ELException("Cannot parse EL property " + PROP_CACHE_SIZE, e);
      }
    }
    Cache cache = cacheSize > 0 ? new Cache(cacheSize) : null;

    return new TreeStore(builder, cache);
  }
View Full Code Here

TOP

Related Classes of de.odysseus.el.tree.TreeStore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.