当前位置: 首页>>代码示例>>Java>>正文


Java Properties类代码示例

本文整理汇总了Java中com.sun.hotspot.igv.data.Properties的典型用法代码示例。如果您正苦于以下问题:Java Properties类的具体用法?Java Properties怎么用?Java Properties使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Properties类属于com.sun.hotspot.igv.data包,在下文中一共展示了Properties类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: apply

import com.sun.hotspot.igv.data.Properties; //导入依赖的package包/类
@Override
public void apply(Diagram diagram) {

    Properties.PropertySelector<Figure> selector = new Properties.PropertySelector<>(diagram.getFigures());
    for (ConnectionStyleRule rule : connectionStyleRules) {
        List<Figure> figures = null;
        if (rule.getSelector() != null) {
            figures = rule.getSelector().selected(diagram);
        } else {
            figures = diagram.getFigures();
        }

        for (Figure f : figures) {
            for (OutputSlot os : f.getOutputSlots()) {
                for (Connection c : os.getConnections()) {
                    if (figures.contains(c.getInputSlot().getFigure())) {
                        c.setStyle(rule.getLineStyle());
                        c.setColor(rule.getLineColor());
                    }
                }
            }
        }
    }
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:25,代码来源:ConnectionFilter.java

示例2: BytecodeNode

import com.sun.hotspot.igv.data.Properties; //导入依赖的package包/类
public BytecodeNode(InputBytecode bytecode, InputGraph graph, String bciValue) {

        super(Children.LEAF);
        String displayName = bytecode.getBci() + " " + bytecode.getName() + " " + bytecode.getOperands();

        bciValue = bytecode.getBci() + " " + bciValue;
        bciValue = bciValue.trim();

        Properties.PropertySelector<InputNode> selector = new Properties.PropertySelector<>(graph.getNodes());
        StringPropertyMatcher matcher = new StringPropertyMatcher("bci", bciValue);
        List<InputNode> nodeList = selector.selectMultiple(matcher);
        if (nodeList.size() > 0) {
            nodes = new LinkedHashSet<>();
            for (InputNode n : nodeList) {
                nodes.add(n);
            }
            displayName += " (" + nodes.size() + " nodes)";
        }
        
        if (bytecode.getComment() != null) {
            displayName += " // " + bytecode.getComment();
        }
        
        this.setDisplayName(displayName);
    }
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:26,代码来源:BytecodeNode.java

示例3: getRootFigure

import com.sun.hotspot.igv.data.Properties; //导入依赖的package包/类
public Figure getRootFigure() {
    Properties.PropertySelector<Figure> selector = new Properties.PropertySelector<>(figures);
    Figure root = selector.selectSingle(new StringPropertyMatcher("name", "Root"));
    if (root == null) {
        root = selector.selectSingle(new StringPropertyMatcher("name", "Start"));
    }
    if (root == null) {
        List<Figure> rootFigures = getRootFigures();
        if (rootFigures.size() > 0) {
            root = rootFigures.get(0);
        } else if (figures.size() > 0) {
            root = figures.get(0);
        }
    }

    return root;
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:18,代码来源:Diagram.java

示例4: findMatches

import com.sun.hotspot.igv.data.Properties; //导入依赖的package包/类
private List<InputNode> findMatches(String name, String value, InputGraph inputGraph, SearchResponse response) {
    try {
        RegexpPropertyMatcher matcher = new RegexpPropertyMatcher(name, value, Pattern.CASE_INSENSITIVE);
        Properties.PropertySelector<InputNode> selector = new Properties.PropertySelector<>(inputGraph.getNodes());
        List<InputNode> matches = selector.selectMultiple(matcher);
        return matches.size() == 0 ? null : matches;
    } catch (Exception e) {
        final String msg = e.getMessage();
        response.addResult(new Runnable() {
            @Override
            public void run() {
                Message desc = new NotifyDescriptor.Message("An exception occurred during the search, "
                        + "perhaps due to a malformed query string:\n" + msg,
                        NotifyDescriptor.WARNING_MESSAGE);
                DialogDisplayer.getDefault().notify(desc);
            }
        },
                "(Error during search)"
        );
    }
    return null;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:23,代码来源:NodeQuickSearch.java

示例5: BytecodeNode

import com.sun.hotspot.igv.data.Properties; //导入依赖的package包/类
public BytecodeNode(InputBytecode bytecode, InputGraph graph, String bciValue) {

        super(Children.LEAF);
        String displayName = bytecode.getBci() + " " + bytecode.getName() + " " + bytecode.getOperands();

        bciValue = bytecode.getBci() + " " + bciValue;
        bciValue = bciValue.trim();

        Properties.PropertySelector<InputNode> selector = new Properties.PropertySelector<>(graph.getNodes());
        StringPropertyMatcher matcher = new StringPropertyMatcher("bci", bciValue);
        List<InputNode> nodeList = selector.selectMultiple(matcher);
        if (nodeList.size() > 0) {
            nodes = new LinkedHashSet<>();
            for (InputNode n : nodeList) {
                nodes.add(n);
            }
            displayName += " (" + nodes.size() + " nodes)";
        }

        if (bytecode.getComment() != null) {
            displayName += " // " + bytecode.getComment();
        }

        this.setDisplayName(displayName);
    }
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:26,代码来源:BytecodeNode.java

示例6: apply

import com.sun.hotspot.igv.data.Properties; //导入依赖的package包/类
public void apply(Diagram diagram) {

        Properties.PropertySelector<Figure> selector = new Properties.PropertySelector<Figure>(diagram.getFigures());
        for (ConnectionStyleRule rule : connectionStyleRules) {
            List<Figure> figures = null;
            if (rule.getSelector() != null) {
                figures = rule.getSelector().selected(diagram);
            } else {
                figures = diagram.getFigures();
            }

            for (Figure f : figures) {
                for (OutputSlot os : f.getOutputSlots()) {
                    for (Connection c : os.getConnections()) {
                        if (figures.contains(c.getInputSlot().getFigure())) {
                            c.setStyle(rule.getLineStyle());
                            c.setColor(rule.getLineColor());
                        }
                    }
                }
            }
        }
    }
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:24,代码来源:ConnectionFilter.java

示例7: updateComboBox

import com.sun.hotspot.igv.data.Properties; //导入依赖的package包/类
public void updateComboBox(List<Figure> figures) {

        String sel = (String) nameComboBox.getSelectedItem();
        SortedSet<String> propertyNames = new TreeSet<String>();

        for (Figure f : figures) {
            Properties prop = f.getProperties();
            for (Property p : prop) {
                if (!propertyNames.contains(p.getName())) {
                    propertyNames.add(p.getName());
                }
            }
        }

        for (String s : propertyNames) {
            nameComboBox.addItem(s);
        }
        nameComboBox.setSelectedItem(sel);
    }
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:20,代码来源:FindPanel.java

示例8: export

import com.sun.hotspot.igv.data.Properties; //导入依赖的package包/类
private void export(XMLWriter writer, Group g) throws IOException {
    Properties attributes = new Properties();
    attributes.setProperty("difference", Boolean.toString(true));
    writer.startTag(Parser.GROUP_ELEMENT, attributes);
    writer.writeProperties(g.getProperties());

    if (g.getMethod() != null) {
        export(writer, g.getMethod());
    }

    InputGraph previous = null;
    for (InputGraph graph : g.getGraphs()) {
        export(writer, graph, previous, true);
        previous = graph;
    }

    writer.endTag();
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:19,代码来源:Printer.java

示例9: BytecodeNode

import com.sun.hotspot.igv.data.Properties; //导入依赖的package包/类
public BytecodeNode(InputBytecode bytecode, InputGraph graph, String bciValue) {

        super(Children.LEAF);
        this.setDisplayName(bytecode.getBci() + " " + bytecode.getName());

        bciValue = bytecode.getBci() + " " + bciValue;
        bciValue = bciValue.trim();

        Properties.PropertySelector<InputNode> selector = new Properties.PropertySelector<InputNode>(graph.getNodes());
        StringPropertyMatcher matcher = new StringPropertyMatcher("bci", bciValue);
        List<InputNode> nodeList = selector.selectMultiple(matcher);
        if (nodeList.size() > 0) {
            nodes = new HashSet<InputNode>();
            for (InputNode n : nodeList) {
                nodes.add(n);
            }
            this.setDisplayName(this.getDisplayName() + " (" + nodes.size() + " nodes)");
        }
    }
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:20,代码来源:BytecodeNode.java

示例10: getRootFigure

import com.sun.hotspot.igv.data.Properties; //导入依赖的package包/类
public Figure getRootFigure() {
    Properties.PropertySelector<Figure> selector = new Properties.PropertySelector<Figure>(figures);
    Figure root = selector.selectSingle("name", "Root");
    if (root == null) {
        root = selector.selectSingle("name", "Start");
    }
    if (root == null) {
        List<Figure> rootFigures = getRootFigures();
        if (rootFigures.size() > 0) {
            root = rootFigures.get(0);
        } else if (figures.size() > 0) {
            root = figures.get(0);
        }
    }

    return root;
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:18,代码来源:Diagram.java

示例11: processAttributesAsProperties

import com.sun.hotspot.igv.data.Properties; //导入依赖的package包/类
public void processAttributesAsProperties(Properties p) {
    int length = attr.getLength();
    for (int i = 0; i < length; i++) {
        String val = attr.getValue(i);
        String localName = attr.getLocalName(i);
        p.setProperty(val, localName);
    }
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:9,代码来源:XMLParser.java


注:本文中的com.sun.hotspot.igv.data.Properties类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。