io.tracee.contextlogger.contextprovider.api.WrappedContextData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of contextprovider-api Show documentation
Show all versions of contextprovider-api Show documentation
Please refer to https://github.com/tracee/contextlogger.
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();
}