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


Java Type類代碼示例

本文整理匯總了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;
}
 
開發者ID:ytus,項目名稱:findbugs-all-the-bugs,代碼行數:9,代碼來源:CFG.java

示例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;
}
 
開發者ID:ytus,項目名稱:findbugs-all-the-bugs,代碼行數:21,代碼來源:CFG.java

示例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;
}
 
開發者ID:ytus,項目名稱:findbugs-all-the-bugs,代碼行數:15,代碼來源:CFG.java

示例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;
}
 
開發者ID:ytus,項目名稱:findbugs-all-the-bugs,代碼行數:15,代碼來源:CFG.java

示例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);
}
 
開發者ID:ytus,項目名稱:findbugs-all-the-bugs,代碼行數:13,代碼來源:CFG.java

示例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);
}
 
開發者ID:ytus,項目名稱:findbugs-all-the-bugs,代碼行數:13,代碼來源:CFG.java


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