本文整理匯總了Java中org.apache.maven.artifact.Artifact.getType方法的典型用法代碼示例。如果您正苦於以下問題:Java Artifact.getType方法的具體用法?Java Artifact.getType怎麽用?Java Artifact.getType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.maven.artifact.Artifact
的用法示例。
在下文中一共展示了Artifact.getType方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setReferenceTree
import org.apache.maven.artifact.Artifact; //導入方法依賴的package包/類
private void setReferenceTree(CheckNode mtb) {
Artifact art = (Artifact) mtb.getUserObject();
if (modelCache.containsKey(art)) {
trRef.setModel(modelCache.get(art));
} else {
if (rootnode == null) {
trRef.setModel(new DefaultTreeModel(new DefaultMutableTreeNode()));
} else {
DependencyExcludeNodeVisitor nv = new DependencyExcludeNodeVisitor(art.getGroupId(), art.getArtifactId(), art.getType());
rootnode.accept(nv);
Set<DependencyNode> nds = nv.getDirectDependencies();
DefaultTreeModel dtm = new DefaultTreeModel(createReferenceModel(nds, mtb));
trRef.setModel(dtm);
modelCache.put(art, dtm);
}
}
}
示例2: valueOf
import org.apache.maven.artifact.Artifact; //導入方法依賴的package包/類
public final static ArtifactItem valueOf(Artifact artifact) {
ArtifactItem item = new ArtifactItem(artifact.getGroupId(),artifact.getArtifactId(),artifact.getType(),artifact.getVersion());
item.setClassifier(artifact.getClassifier());
item.setScope( artifact.getScope());
return item;
}
示例3: ArtifactId
import org.apache.maven.artifact.Artifact; //導入方法依賴的package包/類
public ArtifactId( Artifact artifact )
{
this( artifact.getGroupId(), artifact.getArtifactId(), artifact.getType(), artifact.getClassifier() );
}