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

com.xlrit.gears.base.form.AbstractCompanion Maven / Gradle / Ivy

There is a newer version: 1.17.5
Show newest version
package com.xlrit.gears.base.form;

import java.util.Objects;

import com.xlrit.gears.base.choice.ChoicesFactory;
import com.xlrit.gears.base.execution.Execution;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

public abstract class AbstractCompanion implements Companion {
	private static final Logger LOG = LoggerFactory.getLogger(AbstractCompanion.class);

	@Autowired
	protected ChoicesFactory choicesFactory;

	protected final Class formClass;

	protected AbstractCompanion(Class formClass) {
		this.formClass = Objects.requireNonNull(formClass);
	}

	@Override
	public boolean forFormClass(Class formClass) {
		LOG.debug("forFormClass: {} == {}: {}", this.formClass, formClass, this.formClass == formClass);
		return this.formClass == formClass;
	}

	@Override
	public Object getBasedOn(Execution execution) {
		return null;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy