@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ( isManaged() ? 1231 : 1237 ); result = prime * result + ( ( plugin == null ) ? 0 : plugin.hashCode() ); return result; }
@Override public String toString() { return String.format( "PluginDependencyRelationship [%s -> (%s) => %s (managed=%s, index=%s)]", getDeclaring(), plugin, getTarget(), isManaged(), getIndex() ); }
@Override public PluginDependencyRelationship addSource( final URI source ) { Set<URI> srcs = getSources(); srcs.add( source ); return new SimplePluginDependencyRelationship( srcs, getPomLocation(), getDeclaring(), plugin, getTarget(), getIndex(), isManaged(), isInherited() ); }
@Override public PluginDependencyRelationship addSources( final Collection<URI> sources ) { Set<URI> srcs = getSources(); srcs.addAll( sources ); return new SimplePluginDependencyRelationship( srcs, getPomLocation(), getDeclaring(), plugin, getTarget(), getIndex(), isManaged(), isInherited() ); } }
if ( isManaged() != other.isManaged() )
@Override public synchronized PluginDependencyRelationship cloneFor( final ProjectVersionRef projectRef ) { return new SimplePluginDependencyRelationship( getSources(), getPomLocation(), projectRef, plugin, getTarget(), getIndex(), isManaged(), isInherited() ); }
@Override public PluginDependencyRelationship selectDeclaring( final ProjectVersionRef ref ) { final ArtifactRef t = getTarget(); return new SimplePluginDependencyRelationship( getSources(), getPomLocation(), ref, getPlugin(), t, getIndex(), isManaged(), isInherited() ); }
@Override public PluginDependencyRelationship selectTarget( final ProjectVersionRef ref ) { final ProjectVersionRef d = getDeclaring(); ArtifactRef t = getTarget(); t = (ArtifactRef) ( ( ref instanceof ArtifactRef ) ? ref : new SimpleArtifactRef( ref, t.getType(), t.getClassifier() ) ); return new SimplePluginDependencyRelationship( getSources(), getPomLocation(), d, getPlugin(), t, getIndex(), isManaged(), isInherited() ); }