本文整理汇总了Java中edu.umd.cs.findbugs.ba.Edge.Type类的典型用法代码示例。如果您正苦于以下问题:Java Type类的具体用法?Java Type怎么用?Java Type使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Type类属于edu.umd.cs.findbugs.ba.Edge包,在下文中一共展示了Type类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getEdgeWithType
import edu.umd.cs.findbugs.ba.Edge.Type; //导入依赖的package包/类
private Edge getEdgeWithType(Iterator<Edge> iter, @Type int edgeType) {
while (iter.hasNext()) {
Edge edge = iter.next();
if (edge.getType() == edgeType)
return edge;
}
return null;
}
示例2: createEdge
import edu.umd.cs.findbugs.ba.Edge.Type; //导入依赖的package包/类
/**
* Add a unique edge to the graph. There must be no other edge already in
* the CFG with the same source and destination blocks.
*
* @param source
* the source basic block
* @param dest
* the destination basic block
* @param type
* the type of edge; see constants in EdgeTypes interface
* @return the newly created Edge
* @throws IllegalStateException
* if there is already an edge in the CFG with the same source
* and destination block
*/
public Edge createEdge(BasicBlock source, BasicBlock dest, @Edge.Type int type) {
Edge edge = createEdge(source, dest);
edge.setType(type);
return edge;
}
示例3: getPredecessorWithEdgeType
import edu.umd.cs.findbugs.ba.Edge.Type; //导入依赖的package包/类
/**
* Get the first predecessor reachable from given edge type.
*
* @param target
* the target block
* @param edgeType
* the edge type leading from the predecessor
* @return the predecessor, or null if there is no incoming edge with the
* specified edge type
*/
public BasicBlock getPredecessorWithEdgeType(BasicBlock target, @Type int edgeType) {
Edge edge = getIncomingEdgeWithType(target, edgeType);
return edge != null ? edge.getSource() : null;
}
示例4: getSuccessorWithEdgeType
import edu.umd.cs.findbugs.ba.Edge.Type; //导入依赖的package包/类
/**
* Get the first successor reachable from given edge type.
*
* @param source
* the source block
* @param edgeType
* the edge type leading to the successor
* @return the successor, or null if there is no outgoing edge with the
* specified edge type
*/
public BasicBlock getSuccessorWithEdgeType(BasicBlock source, @Type int edgeType) {
Edge edge = getOutgoingEdgeWithType(source, edgeType);
return edge != null ? edge.getTarget() : null;
}
示例5: getIncomingEdgeWithType
import edu.umd.cs.findbugs.ba.Edge.Type; //导入依赖的package包/类
/**
* Get the first incoming edge in basic block with given type.
*
* @param basicBlock
* the basic block
* @param edgeType
* the edge type
* @return the Edge, or null if there is no edge with that edge type
*/
public Edge getIncomingEdgeWithType(BasicBlock basicBlock, @Type int edgeType) {
return getEdgeWithType(incomingEdgeIterator(basicBlock), edgeType);
}
示例6: getOutgoingEdgeWithType
import edu.umd.cs.findbugs.ba.Edge.Type; //导入依赖的package包/类
/**
* Get the first outgoing edge in basic block with given type.
*
* @param basicBlock
* the basic block
* @param edgeType
* the edge type
* @return the Edge, or null if there is no edge with that edge type
*/
public Edge getOutgoingEdgeWithType(BasicBlock basicBlock, @Type int edgeType) {
return getEdgeWithType(outgoingEdgeIterator(basicBlock), edgeType);
}