Package ch.uzh.ifi.seal.changedistiller.structuredifferencing

Examples of ch.uzh.ifi.seal.changedistiller.structuredifferencing.StructureNode


    @Test
    public void staticFieldModifierShouldBeConverted() throws Exception {
      File left = CompilationUtils.getFile(TEST_DATA + "TestLeft.java");
      ASTHelper<StructureNode> astHelper = getHelper(left);
      StructureNode structureTree = astHelper.createStructureTree();
      StructureNode classNode = findNode(structureTree, "sField : String");
      assertThat(astHelper.createStructureEntityVersion(classNode).isStatic(), is(true));
    }
View Full Code Here


    @Test
    public void volatileFieldModifierShouldBeConverted() throws Exception {
      File left = CompilationUtils.getFile(TEST_DATA + "TestLeft.java");
      ASTHelper<StructureNode> astHelper = getHelper(left);
      StructureNode structureTree = astHelper.createStructureTree();
      StructureNode classNode = findNode(structureTree, "vField : int");
      assertThat(astHelper.createStructureEntityVersion(classNode).isVolatile(), is(true));
    }
View Full Code Here

    @Test
    public void synchronizedFieldModifierShouldBeConverted() throws Exception {
      File left = CompilationUtils.getFile(TEST_DATA + "TestLeft.java");
      ASTHelper<StructureNode> astHelper = getHelper(left);
      StructureNode structureTree = astHelper.createStructureTree();
      StructureNode classNode = findNode(structureTree, "synchField : long");
      assertThat(astHelper.createStructureEntityVersion(classNode).isSynchronized(), is(true));
    }
View Full Code Here

    @Test
    public void transientFieldModifierShouldBeConverted() throws Exception {
      File left = CompilationUtils.getFile(TEST_DATA + "TestLeft.java");
      ASTHelper<StructureNode> astHelper = getHelper(left);
      StructureNode structureTree = astHelper.createStructureTree();
      StructureNode classNode = findNode(structureTree, "tField : String");
      assertThat(astHelper.createStructureEntityVersion(classNode).isTransient(), is(true));
    }
View Full Code Here

    private StructureNode findNode(StructureNode root, String name) {
        for (StructureNode node : root.getChildren()) {
            if (node.getName().equals(name)) {
                return node;
            }
            StructureNode child = findNode(node, name);
            if (child != null) {
                return child;
            }
        }
        return null;
View Full Code Here

TOP

Related Classes of ch.uzh.ifi.seal.changedistiller.structuredifferencing.StructureNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.