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

org.mockito.internal.creation.bytebuddy.MockFeatures Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2016 Mockito contributors
 * This program is made available under the terms of the MIT License.
 */
package org.mockito.internal.creation.bytebuddy;

import org.mockito.mock.SerializableMode;

import java.util.Collections;
import java.util.Set;

public class MockFeatures {

    final Class mockedType;
    final Set> interfaces;
    final SerializableMode serializableMode;
    final boolean stripAnnotations;

    private MockFeatures(Class mockedType, Set> interfaces,
                         SerializableMode serializableMode, boolean stripAnnotations) {
        this.mockedType = mockedType;
        this.interfaces = Collections.unmodifiableSet(interfaces);
        this.serializableMode = serializableMode;
        this.stripAnnotations = stripAnnotations;
    }

    public static  MockFeatures withMockFeatures(Class mockedType,
                                                       Set> interfaces,
                                                       SerializableMode serializableMode,
                                                       boolean stripAnnotations) {
        return new MockFeatures(mockedType, interfaces, serializableMode, stripAnnotations);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy