Package de.odysseus.el.tree.impl

Examples of de.odysseus.el.tree.impl.Cache


        cacheSize = Integer.parseInt(properties.getProperty("javax.el.cacheSize"));
      } catch (NumberFormatException e) {
        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

        cacheSize = Integer.parseInt(properties.getProperty("javax.el.cacheSize"));
      } catch (NumberFormatException e) {
        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

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

    /** 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

        cacheSize = Integer.parseInt(properties.getProperty(PROP_CACHE_SIZE));
      } catch (NumberFormatException e) {
        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

        cacheSize = Integer.parseInt(properties.getProperty(PROP_CACHE_SIZE));
      } catch (NumberFormatException e) {
        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

        cacheSize = Integer.parseInt(properties.getProperty(PROP_CACHE_SIZE));
      } catch (NumberFormatException e) {
        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

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

TOP

Related Classes of de.odysseus.el.tree.impl.Cache

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.