當前位置: 首頁>>代碼示例>>Java>>正文


Java TEdge類代碼示例

本文整理匯總了Java中com.syncleus.ferma.TEdge的典型用法代碼示例。如果您正苦於以下問題:Java TEdge類的具體用法?Java TEdge怎麽用?Java TEdge使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TEdge類屬於com.syncleus.ferma包,在下文中一共展示了TEdge類的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: resolve

import com.syncleus.ferma.TEdge; //導入依賴的package包/類
@Override
public <T> Class<? extends T> resolve(final Element element, final Class<T> kind) {
    if (VertexFrame.class.equals(kind) || AbstractVertexFrame.class.equals(kind))
        return (Class<? extends T>) TVertex.class;
    else if (EdgeFrame.class.equals(kind) || AbstractEdgeFrame.class.equals(kind))
        return (Class<? extends T>) TEdge.class;
    return kind;
}
 
開發者ID:Syncleus,項目名稱:Ferma,代碼行數:9,代碼來源:UntypedTypeResolver.java

示例2: testInvalidAbstractVertexEdge

import com.syncleus.ferma.TEdge; //導入依賴的package包/類
@Test (expected = IllegalStateException.class)
public void testInvalidAbstractVertexEdge() {
    TVertex v1 = fg.addFramedVertex();
    TVertex v2 = fg.addFramedVertex();
    TEdge e1 = fg.addFramedEdge(v1, v2, "some_label");
    frameFactory.create(e1.getElement(), InvalidFrame.class);
}
 
開發者ID:Syncleus,項目名稱:Ferma,代碼行數:8,代碼來源:AnnotationFrameFactoryTest.java

示例3: testResolveWithDefault

import com.syncleus.ferma.TEdge; //導入依賴的package包/類
@Test
public void testResolveWithDefault() {
    Element mockElement = Mockito.mock(Element.class);
    Assert.assertEquals(resolver.resolve(mockElement, VertexFrame.class), TVertex.class);
    Mockito.verifyZeroInteractions(mockElement);
    Assert.assertEquals(resolver.resolve(mockElement, AbstractVertexFrame.class), TVertex.class);
    Mockito.verifyZeroInteractions(mockElement);
    Assert.assertEquals(resolver.resolve(mockElement, EdgeFrame.class), TEdge.class);
    Mockito.verifyZeroInteractions(mockElement);
    Assert.assertEquals(resolver.resolve(mockElement, AbstractEdgeFrame.class), TEdge.class);
    Mockito.verifyZeroInteractions(mockElement);
    Assert.assertEquals(resolver.resolve(mockElement, God.class), God.class);
    Mockito.verifyZeroInteractions(mockElement);
}
 
開發者ID:Syncleus,項目名稱:Ferma,代碼行數:15,代碼來源:UntypedTypeResolverTest.java

示例4: testAddEdgeDefault

import com.syncleus.ferma.TEdge; //導入依賴的package包/類
@Test
public void testAddEdgeDefault() {
    TEdge implTedge = arrayList.implementNewInterface();
    ImplementsEdge implEdge = implTedge.reframe(ImplementsEdge.class);
    implEdge.getInterface().setFullyQualifiedName(Iterable.class.getName());
    JavaInterfaceVertex iterable = findInterfaceVertex(javaClassesGraph, Iterable.class);
    Assert.assertNotNull(iterable);
    Assert.assertEquals(Iterable.class.getName(), iterable.getFullyQualifiedName());
}
 
開發者ID:Syncleus,項目名稱:Ferma,代碼行數:10,代碼來源:IncidenceHandlerWithJavaClassVerticesTest.java

示例5: testAddUntypedEdgeTypedVertex

import com.syncleus.ferma.TEdge; //導入依賴的package包/類
@Test
public void testAddUntypedEdgeTypedVertex() {
    TEdge implTedge = arrayList.implementNewType(JavaInterfaceVertex.DEFAULT_INITIALIZER);
    ImplementsEdge implEdge = implTedge.reframe(ImplementsEdge.class);
    implEdge.getInterface().setFullyQualifiedName(Iterable.class.getName());
    JavaInterfaceVertex iterable = findInterfaceVertex(javaClassesGraph, Iterable.class);
    Assert.assertNotNull(iterable);
    Assert.assertEquals(Iterable.class.getName(), iterable.getFullyQualifiedName());
}
 
開發者ID:Syncleus,項目名稱:Ferma,代碼行數:10,代碼來源:IncidenceHandlerWithJavaClassVerticesTest.java

示例6: testAddFileParentEdgeDefault

import com.syncleus.ferma.TEdge; //導入依賴的package包/類
@Test
public void testAddFileParentEdgeDefault() {

    final FramedGraph framedGraph = FileSystemGraphLoader.INSTANCE.load();
    final DirectoryVertex home = findVertex(framedGraph, "name", "home", DirectoryVertex.class);
    final TEdge newUserTEdge = home.createSubDirParentEdge();
    final ParentEdge newUserEdge = newUserTEdge.reframe(ParentEdge.class);
    final FileVertex userDir = newUserEdge.getChild();
    userDir.setName(NEW_USER_NAME);
    Assert.assertEquals(1, userDir.getParents().size());
    Assert.assertEquals("home", userDir.getParents().get(0).getName());
}
 
開發者ID:Syncleus,項目名稱:Ferma,代碼行數:13,代碼來源:IncidenceHandlerWithFileVerticesTest.java

示例7: testAddItemEdgeTyped

import com.syncleus.ferma.TEdge; //導入依賴的package包/類
@Test
public void testAddItemEdgeTyped() {
    final FramedGraph framedGraph = FileSystemGraphLoader.INSTANCE.load();
    final DirectoryVertex home = findVertex(framedGraph, "name", "home", DirectoryVertex.class);
    final TEdge newUserDirTEdge = home.addItemEdge(DirectoryVertex.DEFAULT_INITIALIZER);
    final DirectoryVertex newUserDir = (DirectoryVertex) newUserDirTEdge.reframe(ParentEdge.class).getChild();
    newUserDir.setName(NEW_USER_NAME);
    final TEdge newUserAddrBookTEdge = newUserDir.addItemEdge(FileVertex.DEFAULT_INITIALIZER);
    final FileVertex newUserAddrBook = newUserAddrBookTEdge.reframe(ParentEdge.class).getChild();
    newUserAddrBook.setName(ADDR_BOOK_FILE_NAME);

    assertNewUserAndAddrBook(framedGraph);
}
 
開發者ID:Syncleus,項目名稱:Ferma,代碼行數:14,代碼來源:IncidenceHandlerWithFileVerticesTest.java

示例8: createSubDirParentEdge

import com.syncleus.ferma.TEdge; //導入依賴的package包/類
@Incidence(label = "parent", direction = Direction.IN, operation = Incidence.Operation.ADD)
public abstract TEdge createSubDirParentEdge();
 
開發者ID:Syncleus,項目名稱:Ferma,代碼行數:3,代碼來源:DirectoryVertex.java

示例9: createSubDirChildEdge

import com.syncleus.ferma.TEdge; //導入依賴的package包/類
@Incidence(label = "parent", direction = Direction.OUT, operation = Incidence.Operation.ADD)
public abstract TEdge createSubDirChildEdge();
 
開發者ID:Syncleus,項目名稱:Ferma,代碼行數:3,代碼來源:DirectoryVertex.java

示例10: addItemEdge

import com.syncleus.ferma.TEdge; //導入依賴的package包/類
@Incidence(label = "parent", direction = Direction.IN, operation = Incidence.Operation.ADD)
public abstract <T extends FileVertex> TEdge addItemEdge(ClassInitializer<? extends T> initializer);
 
開發者ID:Syncleus,項目名稱:Ferma,代碼行數:3,代碼來源:DirectoryVertex.java

示例11: addChild

import com.syncleus.ferma.TEdge; //導入依賴的package包/類
@Incidence(label = "parent", direction = Direction.IN)
public abstract TEdge addChild(FileVertex child);
 
開發者ID:Syncleus,項目名稱:Ferma,代碼行數:3,代碼來源:DirectoryVertex.java

示例12: implementNewInterface

import com.syncleus.ferma.TEdge; //導入依賴的package包/類
@Incidence(label = "implements", direction = Direction.OUT, operation = Incidence.Operation.ADD)
public TEdge implementNewInterface();
 
開發者ID:Syncleus,項目名稱:Ferma,代碼行數:3,代碼來源:JavaClassVertex.java

示例13: implementNewType

import com.syncleus.ferma.TEdge; //導入依賴的package包/類
@Incidence(label = "implements", direction = Direction.OUT, operation = Incidence.Operation.ADD)
public TEdge implementNewType(ClassInitializer<? extends JavaInterfaceVertex> typeInitializer);
 
開發者ID:Syncleus,項目名稱:Ferma,代碼行數:3,代碼來源:JavaClassVertex.java

示例14: implementInterface

import com.syncleus.ferma.TEdge; //導入依賴的package包/類
@Incidence(label = "implements", direction = Direction.OUT, operation = Incidence.Operation.ADD)
TEdge implementInterface(JavaInterfaceVertex iface);
 
開發者ID:Syncleus,項目名稱:Ferma,代碼行數:3,代碼來源:JavaClassVertex.java


注:本文中的com.syncleus.ferma.TEdge類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。