sustain/src/main/java/net/happyonroad/component/core/support/Dependency.java
public boolean accept(Versionize componentOrDependency) {
        boolean accept = getGroupId().equals(componentOrDependency.getGroupId()) &&
                         getArtifactId().equals(componentOrDependency.getArtifactId());
        if (!accept) return false;
        if (getVersion() != null) {
            //有version需要，暂时不知道是否需要支持version的表达式，maven自身好像没有这个机制
            accept = getVersion().equals(componentOrDependency.getVersion());
            if (!accept) return false;
        }
        if( range != null ){
            // Temp solution
            if( componentOrDependency.getVersion() == null ) return true;
            accept = range.containsVersion(new ComponentVersion(componentOrDependency.getVersion()));
            if (!accept) return false;
        }
/*
        if( getClassifier() != null ){
            accept = getClassifier().equals(componentOrDependency.getClassifier());
            if (!accept) return false;
        }
*/
/*
        if( getType() != null ){
            accept = getType().equals(componentOrDependency.getType());
            if (!accept) return false;
        }
*/
        return true;
    }
public boolean accept(Versionize componentOrDependency) {
        boolean accept = getGroupId().equals(componentOrDependency.getGroupId()) &&
                         getArtifactId().equals(componentOrDependency.getArtifactId());
        if (!accept) return false;
        if (getVersion() != null) {
            //有version需要，暂时不知道是否需要支持version的表达式，maven自身好像没有这个机制
            accept = getVersion().equals(componentOrDependency.getVersion());
            if (!accept) return false;
        }
        if( range != null ){
            // Temp solution
            if( componentOrDependency.getVersion() == null ) return true;
            accept = range.containsVersion(new ComponentVersion(componentOrDependency.getVersion()));
            if (!accept) return false;
        }
/*
        if( getClassifier() != null ){
            accept = getClassifier().equals(componentOrDependency.getClassifier());
            if (!accept) return false;
        }
*/
/*
        if( getType() != null ){
            accept = getType().equals(componentOrDependency.getType());
            if (!accept) return false;
        }
*/
        return true;
    }
判断某个组件是否满足特定依赖信息
<pre>
如， dependency1 = {groupId: dnt, artifactId: component}
dependency2 = {groupId: dnt, artifactId: component, version: 1.0.0}
那么: dependency1.accept(dependency2) = true
反之: dependency2.accept(dependency1) = false
</pre>
@param componentOrDependency 被判断的组件或者其他依赖
@return 是否依赖