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

com.xlrit.gears.base.event.ElementEvent Maven / Gradle / Ivy

There is a newer version: 1.17.6
Show newest version
package com.xlrit.gears.base.event;

import org.springframework.core.ResolvableType;
import org.springframework.core.ResolvableTypeProvider;

public abstract class ElementEvent implements ResolvableTypeProvider {

	protected final String kind;
	protected final Class type;
	protected final T element;

	protected ElementEvent(String kind, Class type, T element) {
		this.kind = kind;
		this.type = type;
		this.element = element;
	}

	public String getKind() {
		return kind;
	}

	public T getElement() {
		return element;
	}

	public Class getType() {
		return type;
	}

	@Override
	public ResolvableType getResolvableType() {
		return ResolvableType.forClassWithGenerics(getClass(), type);
	}

	@Override
	public String toString() {
		return getClass().getSimpleName() + "[" +
			", type=" + type +
			", element=" + element +
			']';
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy