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

com.fasterxml.jackson.dataformat.javaprop.JavaPropsMapper Maven / Gradle / Ivy

Go to download

Support for reading and writing content of "Java Properties" style configuration files as if there was implied nesting structure (by default using dots as separators).

There is a newer version: 2.18.2
Show newest version
package com.fasterxml.jackson.dataformat.javaprop;

import java.io.IOException;
import java.util.Properties;

import com.fasterxml.jackson.core.Version;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;

public class JavaPropsMapper extends ObjectMapper
{
    private static final long serialVersionUID = 1L;

    /*
    /**********************************************************
    /* Life-cycle
    /**********************************************************
     */

    public JavaPropsMapper() {
        this(new JavaPropsFactory());
    }

    public JavaPropsMapper(JavaPropsFactory f) {
        super(f);
    }

    protected JavaPropsMapper(JavaPropsMapper src) {
        super(src);
    }
    
    @Override
    public JavaPropsMapper copy()
    {
        _checkInvalidCopy(JavaPropsMapper.class);
        return new JavaPropsMapper(this);
    }

    @Override
    public Version version() {
        return PackageVersion.VERSION;
    }

    @Override
    public JavaPropsFactory getFactory() {
        return (JavaPropsFactory) _jsonFactory;
    }

    /*
    /**********************************************************
    /* Extended read methods
    /**********************************************************
     */

    public  T readValue(Properties props, Class valueType)
        throws IOException
    {
        return readValue(getFactory().createParser(props), valueType);
    }

    public  T readValue(Properties props, JavaType valueType)
        throws IOException
    {
        return readValue(getFactory().createParser(props), valueType);
    }

    /*
    /**********************************************************
    /* Extended write methods
    /**********************************************************
     */

    // do we have any actually?

    /*
    /**********************************************************
    /* Schema support methods?
    /**********************************************************
     */

    // do we have any actually?
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy