Package org.apache.commons.configuration.interpol

Examples of org.apache.commons.configuration.interpol.ConfigurationInterpolator


    public void testLocalLookupsInInterpolatorAreInherited() {
        parent.addProperty("tablespaces.tablespace.name", "default");
        parent.addProperty("tablespaces.tablespace(-1).name", "test");
        parent.addProperty("tables.table(0).var", "${brackets:x}");

        ConfigurationInterpolator interpolator = parent.getInterpolator();
        interpolator.registerLookup("brackets", new StrLookup(){

            @Override
            public String lookup(String key) {
                return "(" + key +")";
            }
View Full Code Here


    }

    @Test
    public void testLocalLookupsInInterpolatorAreInherited() {
        BaseConfiguration config = new BaseConfiguration();
        ConfigurationInterpolator interpolator = config.getInterpolator();
        interpolator.registerLookup("brackets", new StrLookup(){

            @Override
            public String lookup(String key) {
                return "(" + key +")";
            }
View Full Code Here

     * @return the newly created interpolator object
     * @since 1.4
     */
    protected ConfigurationInterpolator createInterpolator()
    {
        ConfigurationInterpolator interpol = new ConfigurationInterpolator();
        interpol.setDefaultLookup(new StrLookup()
        {
            @Override
            public String lookup(String var)
            {
                Object prop = resolveContainerStore(var);
View Full Code Here

     * @return the new interpolator
     */
    @Override
    protected ConfigurationInterpolator createInterpolator()
    {
        ConfigurationInterpolator interpolator = super.createInterpolator();
        interpolator.setParentInterpolator(getParent().getInterpolator());
        return interpolator;
    }
View Full Code Here

     * @return the newly created interpolator object
     * @since 1.4
     */
    protected ConfigurationInterpolator createInterpolator()
    {
        ConfigurationInterpolator interpol = new ConfigurationInterpolator();
        interpol.setDefaultLookup(new StrLookup()
        {
            @Override
            public String lookup(String var)
            {
                Object prop = resolveContainerStore(var);
View Full Code Here

TOP

Related Classes of org.apache.commons.configuration.interpol.ConfigurationInterpolator

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.