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

it.espr.injector.Bean Maven / Gradle / Ivy

package it.espr.injector;

import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.util.List;
import java.util.Map;

public class Bean {

	public final String name;

	public final String key;

	public final boolean singleton;

	public final Class type;

	public final Constructor constructor;

	public final List> constructorParameters;

	public final Map> fields;

	public Bean(String name, String key, boolean singleton, Class type, Constructor constructor, List> constructorParameters,
			Map> fields) {
		super();
		this.name = name;
		this.key = key;
		this.singleton = singleton;
		this.type = type;
		this.constructor = constructor;
		this.constructorParameters = constructorParameters;
		this.fields = fields;
	}

	@Override
	public int hashCode() {
		return key.hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}

		if (obj == null) {
			return false;
		}

		if (getClass() != obj.getClass())
			return false;

		Bean other = (Bean) obj;
		return key.equals(other.key);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy