net.sourceforge.pmd.lang.ast.Node.getDataFlowNode()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(82)

本文整理了Java中net.sourceforge.pmd.lang.ast.Node.getDataFlowNode()方法的一些代码示例,展示了Node.getDataFlowNode()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getDataFlowNode()方法的具体详情如下:
包路径:net.sourceforge.pmd.lang.ast.Node
类名称:Node
方法名:getDataFlowNode

Node.getDataFlowNode介绍

暂无

代码示例

代码示例来源:origin: pmd/pmd

@Override
public DataFlowNode getDataFlowNode() {
  if (this.dataFlowNode == null) {
    if (this.parent != null) {
      return parent.getDataFlowNode();
    }
    return null; // TODO wise?
  }
  return dataFlowNode;
}

代码示例来源:origin: pmd/pmd

private void computeNow(Node node) {
  DataFlowNode inode = node.getDataFlowNode();
  List<VariableAccess> undefinitions = markUsages(inode);
  // all variables are first in state undefinition
  DataFlowNode firstINode = inode.getFlow().get(0);
  firstINode.setVariableAccess(undefinitions);
  // all variables are getting undefined when leaving scope
  DataFlowNode lastINode = inode.getFlow().get(inode.getFlow().size() - 1);
  lastINode.setVariableAccess(undefinitions);
}

代码示例来源:origin: pmd/pmd

private void computeNow(Node node) {
  DataFlowNode inode = node.getDataFlowNode();
  List<VariableAccess> undefinitions = markUsages(inode);
  // all variables are first in state undefinition
  DataFlowNode firstINode = inode.getFlow().get(0);
  firstINode.setVariableAccess(undefinitions);
  // all variables are getting undefined when leaving scope
  DataFlowNode lastINode = inode.getFlow().get(inode.getFlow().size() - 1);
  lastINode.setVariableAccess(undefinitions);
}

代码示例来源:origin: pmd/pmd

List<DataFlowNode> flow = node.getDataFlowNode().getFlow();
FontMetrics fm = g.getFontMetrics();
int halfFontHeight = fm.getAscent() / 2;

代码示例来源:origin: net.sourceforge.pmd/pmd-core

@Override
public DataFlowNode getDataFlowNode() {
  if (this.dataFlowNode == null) {
    if (this.parent != null) {
      return parent.getDataFlowNode();
    }
    return null; // TODO wise?
  }
  return dataFlowNode;
}

代码示例来源:origin: net.sourceforge.pmd/pmd-java

private void computeNow(Node node) {
  DataFlowNode inode = node.getDataFlowNode();
  List<VariableAccess> undefinitions = markUsages(inode);
  // all variables are first in state undefinition
  DataFlowNode firstINode = inode.getFlow().get(0);
  firstINode.setVariableAccess(undefinitions);
  // all variables are getting undefined when leaving scope
  DataFlowNode lastINode = inode.getFlow().get(inode.getFlow().size() - 1);
  lastINode.setVariableAccess(undefinitions);
}

代码示例来源:origin: net.sourceforge.pmd/pmd-core

List<DataFlowNode> flow = node.getDataFlowNode().getFlow();
FontMetrics fm = g.getFontMetrics();
int halfFontHeight = fm.getAscent() / 2;

相关文章