junit.quilt.cover.generic
Interface EdgeFactory

All Known Implementing Classes:
EdgeFactoryImpl

public interface EdgeFactory


Method Summary
 BlockVertex makeBlockVertex(org.apache.bcel.classfile.LineNumberTable lineNumberTable)
          makeBlockVertex() Override this method if you want to provide a special implementation of a block vertex.
 FlowControlEdge makeBranchEdge(BlockVertex source, BlockVertex target, java.lang.String branch, boolean value)
          makeBranchEdge() Override this if you want to have a specific Branch Edge in your graph.
 FlowControlEdge makeDummyEdge(BlockVertex start, BlockVertex end)
          makeDummyEdge This is used to add a dummy edge into the graph.
 FinallyVertex makeEndVertex()
          makeEndVertex This will create a single exit point from the graph.
 FlowControlEdge makeExceptionEdge(BlockVertex source, BlockVertex handler, java.lang.Class exception)
          makeExceptionEdge() Override this method if you want to make a special exception edge.
 FlowControlEdge makeExceptionEdge(BlockVertex source, BlockVertex handler, org.apache.bcel.generic.ObjectType exception)
           
 FlowControlEdge makeExceptionEdge(BlockVertex source, java.lang.Class exception)
           
 FlowControlEdge makeExceptionEdge(BlockVertex source, org.apache.bcel.generic.ObjectType exception)
           
 FlowControlEdge makeJSREdge(BlockVertex source, BlockVertex target)
          makeJSREdge() This returns an edge generated by a JSR instruction.
 FlowControlEdge makeNormalEdge(BlockVertex source, BlockVertex target)
          makeNormalEdge() Override this method if you want to make a special normal edge.
 FlowControlEdge makeReturnEdge(BlockVertex ret)
          makeReturnEdge This is called when a Return statement happens.
 FlowControlEdge makeSelectEdge(BlockVertex source, BlockVertex target, java.lang.String expr)
           
 FlowControlEdge makeSelectEdge(BlockVertex source, BlockVertex target, java.lang.String expr, int value)
          makeSelectEdge Override this method if you want to make a custom SelectEdge.
 InitVertex makeStartVertex()
          makeStartVertex This will create a new vertex which acts as the entry point into the method.
 

Method Detail

makeBranchEdge

public FlowControlEdge makeBranchEdge(BlockVertex source,
                                      BlockVertex target,
                                      java.lang.String branch,
                                      boolean value)
makeBranchEdge() Override this if you want to have a specific Branch Edge in your graph.
Parameters:
source - is the BlockVertex which contains the branch statement.
target - is the target BlockVertex of the branch.
branch - will contain as much of a description of the branch we can get. (i.e. "a < 0")
value - is the required value the condition needs to evaluate to to execute this branch edge.

makeSelectEdge

public FlowControlEdge makeSelectEdge(BlockVertex source,
                                      BlockVertex target,
                                      java.lang.String expr,
                                      int value)
makeSelectEdge Override this method if you want to make a custom SelectEdge.
Parameters:
source - is the BlockVertex which contains the Select statement.
target - is the BlockVertex which is targeted by the Select statement.
expr - is the expression which is evaluated for the switch statement. (i.e. "a + b")
value - is the integer value which is required in order to execute this branch. (The second version, without the "value" param is called for the default value.

makeSelectEdge

public FlowControlEdge makeSelectEdge(BlockVertex source,
                                      BlockVertex target,
                                      java.lang.String expr)

makeExceptionEdge

public FlowControlEdge makeExceptionEdge(BlockVertex source,
                                         BlockVertex handler,
                                         java.lang.Class exception)
makeExceptionEdge() Override this method if you want to make a special exception edge.
Parameters:
source - is the BlockVertex which contains the exception thrower.
handler - is the BlockVertex which acts as this exception handler.
exceptions - is the set of exceptions which are caught by the exception handler. In the second variation, without the handler, it represents an unhandled exception.

makeExceptionEdge

public FlowControlEdge makeExceptionEdge(BlockVertex source,
                                         java.lang.Class exception)

makeExceptionEdge

public FlowControlEdge makeExceptionEdge(BlockVertex source,
                                         BlockVertex handler,
                                         org.apache.bcel.generic.ObjectType exception)

makeExceptionEdge

public FlowControlEdge makeExceptionEdge(BlockVertex source,
                                         org.apache.bcel.generic.ObjectType exception)

makeNormalEdge

public FlowControlEdge makeNormalEdge(BlockVertex source,
                                      BlockVertex target)
makeNormalEdge() Override this method if you want to make a special normal edge. A Normal Edge is used when there is only normal flow of control. (No branching or exceptions.) Just because you have a normal edge though, does not mean that the source and target fall under the same basic block. This edge may very well be a target from a previous branch.
Parameters:
source - is the first BlockVertex in sequence.
target - is the second BlockVertex in sequence.

makeJSREdge

public FlowControlEdge makeJSREdge(BlockVertex source,
                                   BlockVertex target)
makeJSREdge() This returns an edge generated by a JSR instruction.

makeReturnEdge

public FlowControlEdge makeReturnEdge(BlockVertex ret)
makeReturnEdge This is called when a Return statement happens.
Parameters:
source - is the BlockVertex which contains the return.

makeDummyEdge

public FlowControlEdge makeDummyEdge(BlockVertex start,
                                     BlockVertex end)
makeDummyEdge This is used to add a dummy edge into the graph. It will never make it into Bytecode.

makeBlockVertex

public BlockVertex makeBlockVertex(org.apache.bcel.classfile.LineNumberTable lineNumberTable)
makeBlockVertex() Override this method if you want to provide a special implementation of a block vertex. A BlockVertex represents a collection of OpCodes which have no branches or exceptions in them. (Except for the last member of the BlockVertex.
Parameters:
lineNumberTable - is the line number table for the method. It can use this to determine which lines the block includes. It may be NULL. A BlockVertex is responsible for holding all of the instruction handles in the graph.

makeStartVertex

public InitVertex makeStartVertex()
makeStartVertex This will create a new vertex which acts as the entry point into the method. This gives a location for initialization code. No LineNumberTable is provided, because there are no line numbers for added code.

makeEndVertex

public FinallyVertex makeEndVertex()
makeEndVertex This will create a single exit point from the graph. This will help us in adding a finally statement, I believe.


Copyright © 2001-2002 David Dixon-Peugh. All Rights Reserved.