All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.codehaus.plexus.util.interpolation.ObjectBasedValueSource Maven / Gradle / Ivy

Go to download

A collection of various utility classes to ease working with strings, files, command lines, XML and more.

There is a newer version: 4.0.2
Show newest version
package org.codehaus.plexus.util.interpolation;

import org.codehaus.plexus.util.introspection.ReflectionValueExtractor;


public class ObjectBasedValueSource
    implements ValueSource
{
    
    private final Object root;

    public ObjectBasedValueSource( Object root )
    {
        this.root = root;
    }

    public Object getValue( String expression )
    {
        try
        {
            return ReflectionValueExtractor.evaluate( expression, root, false );
        }
        catch ( Exception e )
        {
            return null;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy