private void linkDependencies() { for ( final Iterator it = this.implementations.values().iterator(); it.hasNext(); ) { final Implementation implementation = (Implementation) it.next(); for ( int i = implementation.getDeclaredDependencies().size() - 1; i >= 0; i-- ) { final Dependency d = implementation.getDeclaredDependencies(). getDependency( i ); final String key = implementation.getIdentifier() + '/' + d.getName(); final String name = (String) this.dependencies.get( key ); if ( name != null ) { d.setImplementation( d.getSpecification(). getImplementation( name ) ); } } } }
for ( int i = deps.size() - 1; i >= 0; i-- ) final Dependency declaredDependency = deps.getDependency( i ); map.put( declaredDependency.getName(), declaredDependency ); this.getParent().getDependencies(); for ( int i = superDependencies.size() - 1; i >= 0; i-- ) superDependencies.getDependency( i ); deps = new Dependencies(); deps.setDependencies( (Dependency[]) map.values().toArray( new Dependency[ map.size() ] ) );
/** * Gets a dependency for an index. * * @param index the index of the dependency to return. * * @return a reference to the dependency at {@code index}. * * @throws IndexOutOfBoundsException if {@code index} is negativ, * greater than or equal to {@code size()}. */ public final Dependency getDependency( final int index ) { if ( index < 0 || index >= this.size() ) { throw new ArrayIndexOutOfBoundsException( index ); } return this.getDependencies()[index]; }
/** * Creates a string representing the properties of the instance. * * @return a string representing the properties of the instance. */ private String internalString() { final StringBuffer buf = new StringBuffer( 200 ).append( '{' ); buf.append( this.internalString( this ) ); final Dependency[] deps = this.getDependencies(); for ( int i = deps.length - 1; i >= 0; i-- ) { buf.append( ", [" ).append( i ).append( "]=" ). append( deps[i] ); } buf.append( '}' ); return buf.toString(); }
/** * Creates and returns a deep copy of this object. * * @return a clone of this instance. */ public Object clone() { try { final Dependencies ret = (Dependencies) super.clone(); final Dependency[] deps = this.getDependencies(); final Dependency[] cloned = new Dependency[ deps.length ]; for ( int i = deps.length - 1; i >= 0; i-- ) { cloned[i] = (Dependency) deps[i].clone(); } ret.setDependencies( cloned ); return ret; } catch ( final CloneNotSupportedException e ) { throw new AssertionError( e ); } }
final Object dependencyObject = this.getDependency( this.getClassLoader( implementation ), null, ModelFactory.getModel().getModules().
final Dependencies deps = new Dependencies(); deps.setModelVersion( modelVersion ); deps.setDependencies( (Dependency[]) list.toArray( new Dependency[ list.size() ] ) );
/** * Gets the declared dependencies of the implementation. * * @return the declared dependencies of the implementation. */ public Dependencies getDeclaredDependencies() { if ( this.dependencies == null ) { this.dependencies = new Dependencies(); } return this.dependencies; }
/** * Gets the number of dependencies held by the instance. * * @return the number of dependencies held by the instance. */ public final int size() { return this.getDependencies().length; }
/** * Returns a string representation of the object. * * @return a string representation of the object. */ public String toString() { return super.toString() + this.internalString(); }
return this.getDependency( instance.getClassLoader(), instance, impl.getDependencies().getDependency( dependencyName ) );
getDependencies().getDependency("TaskEventSource"). isBound())
for ( int j = deps.size() - 1; j >= 0; j-- ) deps.getDependency( j ).getSpecification(). getIdentifier() ); deps.getDependency( j ).getSpecification(). getIdentifier(), true ) )
/** * Indicates whether some other object is equal to this one by comparing * the values of all properties. * * @param o the reference object with which to compare. * * @return {@code true} if this object is the same as {@code o}; * {@code false} otherwise. */ public boolean equals( final Object o ) { boolean equal = this == o; if ( !equal && o instanceof Dependencies ) { final Dependencies that = (Dependencies) o; final Collection these = Arrays.asList( this.getDependencies() ); final Collection those = Arrays.asList( that.getDependencies() ); equal = this.size() == that.size() && these.containsAll( those ); } return equal; }
getDependencies().getDependency("BankleitzahlenVerzeichnis"). isBound())
for ( int d = deps.size() - 1; d >= 0; d-- ) final Dependency dep = deps.getDependency( d ); if ( dep.getSpecification().getScope() != Specification.SCOPE_MULTITON &&
getDependencies().getDependency("BankleitzahlenVerzeichnis"). isBound())
for ( int d = deps.size() - 1; d >= 0; d-- ) deps.getDependency( d ).getSpecification();
getDependencies().getDependency("PhysicalFileFactory"). isBound())
getDependencies().getDependency("UserInterface"). isBound())