当前位置: 首页>>代码示例>>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;未经允许,请勿转载。