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

org.javers.core.metamodel.type.ContainerType Maven / Gradle / Ivy

There is a newer version: 7.6.1
Show newest version
package org.javers.core.metamodel.type;

import java.lang.reflect.Type;
import static org.javers.common.reflection.ReflectionUtil.extractClass;

/**
 * Collection or Array
 *
 * @author bartosz walacik
 */
public abstract class ContainerType extends EnumerableType {

    ContainerType(Type baseJavaType) {
        super(baseJavaType, 1);
    }

    /**
     * never returns null
     */
    public Type getItemType(){
        return getConcreteClassTypeArguments().get(0);
    }

    /**
     * never returns null
     */
    public Class getItemClass(){
        return extractClass(getItemType());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy