private void ensureNoCycle( Injection injection )
throws DependencyCycleException {
for ( int i = 0; i < hierarchy.length; i++ ) {
Injection parent = hierarchy[i];
if ( parent.equalTo( injection ) ) {
throw new DependencyCycleException( this, injection.getTarget().getResource() );
}
}
}