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

io.tracee.contextlogger.contextprovider.api.WrappedContextData Maven / Gradle / Ivy

There is a newer version: 0.11.0
Show newest version
package io.tracee.contextlogger.contextprovider.api;

/**
 * Interface that marks a class and provides a method to set the context information.
 * Created by Tobias Gindler on 20.03.14.
 */
public interface WrappedContextData {

    /**
     * Used to set context data via reflection.
     *
     * @param instance the context data instance to set
     * @throws ClassCastException if passed instance type is incompatible with wrapper type.
     */
    void setContextData(Object instance) throws ClassCastException;

    /**
     * Used to get wrapped context data.
     *
     * @return
     */
    T getContextData();

    /**
     * Used to determine the wrapped type of the class.
     *
     * @return
     */
    Class getWrappedType();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy