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

de.ppi.deepsampler.persistence.bean.ext.JavaTimeExtension Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version
/*
 * Copyright 2022 PPI AG (Hamburg, Germany)
 * This program is made available under the terms of the MIT License.
 */

package de.ppi.deepsampler.persistence.bean.ext;


import java.lang.reflect.ParameterizedType;
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

public class JavaTimeExtension extends StandardBeanConverterExtension {

    @Override
    public boolean isProcessable(final Class beanClass, final ParameterizedType beanType) {
        return LocalDateTime.class.isAssignableFrom(beanClass) || LocalDate.class.isAssignableFrom(beanClass)
                || Date.class.isAssignableFrom(beanClass) || Instant.class.isAssignableFrom(beanClass);
    }

    @Override
    public boolean skip(final Class beanClass, final ParameterizedType beanType) {
        return true;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy