se.jbee.inject.Parameter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of silk-di Show documentation
Show all versions of silk-di Show documentation
Silk Java dependency injection framework
/*
* 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;
import java.lang.reflect.Constructor;
/**
* {@linkplain Parameter}s are *not* about to find/identify the {@link Constructor} to use! This
* would get far to complex to understand (yet simple to implement) using different constructors
* depending on the {@linkplain Parameter}s.
*
* {@linkplain Parameter}s identify the {@link Instance} to use for the constructor.
*
* How {@linkplain Parameter}s are understood:
*
* - A {@link Class} (via Type)
* - Use the default instance of the given {@linkplain Class}
* - A {@link Type}
* - Use the default instance of the given {@linkplain Type} (needed for generic classes)
* - An {@link Instance}
* - Use the instance identified by the given {@linkplain Instance}
* - A {@link Dependency}
* - Use the instance resolved by the given {@linkplain Dependency} (finest level of control)
* - An instance {@link Object}
* - Use the given {@linkplain Object} (for the first parameter it is assignable to)
*
*
* @author Jan Bernitt ([email protected])
*/
public interface Parameter {
boolean isAssignableTo( Type> type );
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy