public Properties getProperties() { Properties properties = null; if ( this.implementation != null ) { properties = this.implementation.getProperties(); } else if ( this.dependency != null ) { properties = this.dependency.getProperties(); } return properties; }
? instance.getDependencyObject( dependency.getName() ) : null; if ( dependency.getImplementation() != null ) Class.forName( dependency.getSpecification().getIdentifier(), true, classLoader ); classLoader, dependency.getSpecification().getScope(), dependency.getImplementation().getIdentifier(), dependency.getImplementation().getModelVersion(), dependency.getImplementation().getModuleName() ); specClass, dependency.getSpecification(), this.getObject( dependencyInstance ) ); if ( instance != null && dependency.isBound() ) instance.setDependencyObject( dependency.getName(), dependencyObject );
Class.forName( dependency.getSpecification().getIdentifier(), true, classLoader ); switch ( dependency.getSpecification().getMultiplicity() ) if ( dependency.getSpecification(). getImplementations().size() != 1 ) dependency.getSpecification(). getIdentifier() ); impl = dependency.getSpecification().getImplementations(). getImplementation( 0 ); classLoader, dependency.getSpecification().getScope(), impl.getIdentifier(), impl.getModelVersion(), impl.getModuleName() ); clone = (Dependency) dependency.clone(); clone.setImplementation( impl ); dependencyInstance.setDependency( clone ); resolved = this.requestImplementation( specClass, dependency. getSpecification(), this.getObject( dependencyInstance ) ); final List list = new ArrayList( dependency.getSpecification(). getImplementations().size() ); for ( int i = dependency.getSpecification(). getImplementations().size() - 1; i >= 0; i-- )
/** * Setter for property {@code dependencies}. * * @param value the new dependencies for the collection. * * @throws DuplicateDependencyException if {@code value} contains duplicate * dependencies. */ public void setDependencies( final Dependency[] value ) { this.names.clear(); this.hashCode = 0; this.dependencies = null; if ( value != null ) { for ( int i = value.length - 1; i >= 0; i-- ) { this.hashCode += value[i].hashCode(); if ( this.names.put( value[i].getName(), value[i] ) != null ) { this.names.clear(); this.hashCode = 0; throw new DuplicateDependencyException( value[i].getName() ); } } this.dependencies = value; } }
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 ) ); } } } }
getImplementation(Editor.class.getName()). getDependencies().getDependency("TaskEventSource"). isBound())
throws ParseException final Dependency dep = new Dependency(); dep.setModelVersion( modelVersion ); dep.setName( xml.getAttributeNS( namespace, "name" ) ); dep.setBound( Boolean.valueOf( xml.getAttributeNS( namespace, "bound" ) ). booleanValue() ); dep.getName(); dep.setSpecification( this.getSpecification( identifier, null ) ); dep.setSpecification( this.getSpecification( identifier, version ) ); dep.setProperties( this.transformProperties( modelVersion, namespace, (Element) l.item( i ) ) );
if ( dep.getSpecification().getScope() != Specification.SCOPE_MULTITON && dep.getDeclaredProperties().size() > 0 ) impl.getIdentifier(), dep.getName() ); final Properties properties = dep.getDeclaredProperties(); for ( int p = properties.size() - 1; p >= 0; p-- ) dep.getSpecification().getProperties(). getProperty( dependencyProperty.getName() ); dep.getSpecification().getModelVersion(), V_1_3 ) >= 0 ) impl.getIdentifier(), dep.getName() );
map.put( declaredDependency.getName(), declaredDependency ); (Dependency) map.get( superDependency.getName() ); if ( !declaredDependency.getSpecification().getIdentifier(). equals( superDependency.getSpecification(). getIdentifier() ) ) declaredDependency.getName(), declaredDependency.getSpecification(). getIdentifier(), superDependency.getSpecification(). getIdentifier() ); map.put( superDependency.getName(), superDependency );
final Map dependencyProperties = new TreeMap(); for ( int i = this.getDeclaredProperties().size() - 1; i >= 0; i-- ) this.getDeclaredProperties().getProperty( i ); if ( this.getImplementation() != null ) for ( int i = this.getImplementation().getProperties(). size() - 1; i >= 0; i-- ) this.getImplementation().getProperties(). getProperty( i );
public Messages getMessages() { Messages messages = null; if ( this.implementation != null ) { messages = this.implementation.getMessages(); } else if ( this.dependency != null ) { messages = this.dependency.getImplementation().getMessages(); } return messages; }
/** * 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 Dependency ) { final Dependency that = (Dependency) o; equal = this.getName().equals( that.getName() ) && ( this.implementation == null ? that.implementation == null : this.implementation.equals( that.implementation ) ) && ( this.specification == null ? that.specification == null : this.specification.equals( that.specification ) ); } return equal; }
this.modules.getSpecification( deps.getDependency( j ).getSpecification(). getIdentifier() ); deps.getDependency( j ).getSpecification(). getIdentifier(), true ) )
/** * 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 ); } }
getImplementation(BankleitzahlenVerzeichnisDialog.class.getName()). getDependencies().getDependency("BankleitzahlenVerzeichnis"). isBound())
final Class clazz = Class.forName( dep.getImplementation(). getIdentifier(), true, classLoader ); dep.getImplementation().getIdentifier(), e );
/** * Returns a hash code value for this object. * * @return a hash code value for this object. */ public int hashCode() { return this.getName().hashCode() + ( this.implementation == null ? 0 : this.implementation.hashCode() ) + ( this.specification == null ? 0 : this.specification.hashCode() ); }
deps.getDependency( d ).getSpecification();
getImplementation(HeaderDialog.class.getName()). getDependencies().getDependency("BankleitzahlenVerzeichnis"). isBound())
/** * Protected <code>EditorGUI</code> dependency constructor. * * @param meta dependency meta-data. * * @throws NullPointerException if <code>meta</code> is <code>null</code>. */ protected EditorGUI(final Dependency meta) { super(); if(meta == null) { throw new NullPointerException("meta"); } this.initializeProperties(meta.getProperties()); }