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

se.jbee.inject.Injection Maven / Gradle / Ivy

There is a newer version: 0.6
Show newest version
/*
 *  Copyright (c) 2012, Jan Bernitt 
 *			
 *  Licensed under the Apache License, Version 2.0, http://www.apache.org/licenses/LICENSE-2.0
 */
package se.jbee.inject;

/**
 * Describes on "stack-frame" within the injection process.
 * 
 * @author Jan Bernitt ([email protected])
 */
public final class Injection {

	private final Instance dependency;
	private final Emergence target;

	Injection( Instance dependency, Emergence target ) {
		super();
		this.dependency = dependency;
		this.target = target;
	}

	public Emergence getTarget() {
		return target;
	}

	public boolean equalTo( Injection other ) {
		return this == other || dependency.equalTo( other.dependency )
				&& target.getInstance().equalTo( other.target.getInstance() );
	}

	@Override
	public String toString() {
		return "(" + dependency + "->" + target + ")";
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy