Examples of registerLookup()


Examples of org.apache.commons.configuration.interpol.ConfigurationInterpolator.registerLookup()

        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(){

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

Examples of org.apache.commons.configuration.interpol.ConfigurationInterpolator.registerLookup()

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

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

Examples of org.apache.commons.configuration.interpol.ConfigurationInterpolator.registerLookup()

     */
    public static void testGetInterpolator(AbstractConfiguration config)
    {
        config.addProperty("var", "${echo:testVar}");
        ConfigurationInterpolator interpol = config.getInterpolator();
        interpol.registerLookup("echo", new StrLookup()
        {
            public String lookup(String varName)
            {
                return "Value of variable " + varName;
            }
View Full Code Here

Examples of org.apache.commons.configuration.interpol.ConfigurationInterpolator.registerLookup()

     */
    public void testGetInterpolator()
    {
        config.addProperty("var", "${echo:testVar}");
        ConfigurationInterpolator interpol = config.getInterpolator();
        interpol.registerLookup("echo", new StrLookup()
        {
            public String lookup(String varName)
            {
                return "Value of variable " + varName;
            }
View Full Code Here

Examples of org.apache.commons.configuration.interpol.ConfigurationInterpolator.registerLookup()

     */
    public static void testGetInterpolator(AbstractConfiguration config)
    {
        config.addProperty("var", "${echo:testVar}");
        ConfigurationInterpolator interpol = config.getInterpolator();
        interpol.registerLookup("echo", new StrLookup()
        {
            @Override
            public String lookup(String varName)
            {
                return "Value of variable " + varName;
View Full Code Here

Examples of org.apache.commons.configuration.interpol.ConfigurationInterpolator.registerLookup()

        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

Examples of org.apache.commons.configuration.interpol.ConfigurationInterpolator.registerLookup()

    @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

Examples of org.apache.commons.configuration2.interpol.ConfigurationInterpolator.registerLookup()

        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 Lookup() {

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

Examples of org.apache.commons.configuration2.interpol.ConfigurationInterpolator.registerLookup()

     */
    public static void testGetInterpolator(AbstractConfiguration config)
    {
        config.addProperty("var", "${echo:testVar}");
        ConfigurationInterpolator interpol = config.getInterpolator();
        interpol.registerLookup("echo", new Lookup()
        {
            @Override
            public Object lookup(String varName)
            {
                return "Value of variable " + varName;
View Full Code Here

Examples of org.apache.commons.configuration2.interpol.ConfigurationInterpolator.registerLookup()

     * @return the new {@code ConfigurationInterpolator}
     */
    protected static ConfigurationInterpolator createInterpolator()
    {
        ConfigurationInterpolator ci = new ConfigurationInterpolator();
        ci.registerLookup(DefaultLookups.SYSTEM_PROPERTIES.getPrefix(),
                DefaultLookups.SYSTEM_PROPERTIES.getLookup());
        return ci;
    }

    /**
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.