本文整理汇总了Java中com.sun.hotspot.igv.data.Properties.setProperty方法的典型用法代码示例。如果您正苦于以下问题:Java Properties.setProperty方法的具体用法?Java Properties.setProperty怎么用?Java Properties.setProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.hotspot.igv.data.Properties
的用法示例。
在下文中一共展示了Properties.setProperty方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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();
}
示例2: 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);
}
}
示例3: initializeSheet
import com.sun.hotspot.igv.data.Properties; //导入方法依赖的package包/类
public static void initializeSheet(final Properties properties, Sheet s) {
Sheet.Set set1 = Sheet.createPropertiesSet();
set1.setDisplayName("Properties");
for (final Property p : properties) {
Node.Property<String> prop = new Node.Property<String>(String.class) {
@Override
public boolean canRead() {
return true;
}
@Override
public String getValue() throws IllegalAccessException, InvocationTargetException {
return p.getValue();
}
@Override
public boolean canWrite() {
return false;
}
@Override
public void setValue(String arg0) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
properties.setProperty(p.getName(), arg0);
}
};
prop.setName(p.getName());
set1.put(prop);
}
s.put(set1);
}
示例4: createSheet
import com.sun.hotspot.igv.data.Properties; //导入方法依赖的package包/类
@Override
protected Sheet createSheet() {
Sheet s = super.createSheet();
Properties p = new Properties();
p.add(graph.getProperties());
p.setProperty("nodeCount", Integer.toString(graph.getNodes().size()));
p.setProperty("edgeCount", Integer.toString(graph.getEdges().size()));
PropertiesSheet.initializeSheet(p, s);
return s;
}
示例5: getProperties
import com.sun.hotspot.igv.data.Properties; //导入方法依赖的package包/类
@Override
public Properties getProperties() {
Properties p = new Properties();
if (source.getSourceNodes().size() > 0) {
for (InputNode n : source.getSourceNodes()) {
p.add(n.getProperties());
}
} else {
p.setProperty("name", "Slot");
p.setProperty("figure", figure.getProperties().get("name"));
p.setProperty("connectionCount", Integer.toString(connections.size()));
}
return p;
}
示例6: parseProperties
import com.sun.hotspot.igv.data.Properties; //导入方法依赖的package包/类
private void parseProperties(Properties properties) throws IOException {
int propCount = readShort();
for (int j = 0; j < propCount; j++) {
String key = readPoolObject(String.class);
Object value = readPropertyObject();
properties.setProperty(key, value != null ? value.toString() : "null");
}
}
示例7: parseBlocks
import com.sun.hotspot.igv.data.Properties; //导入方法依赖的package包/类
private void parseBlocks(InputGraph graph) throws IOException {
int blockCount = readInt();
List<Edge> edges = new LinkedList<>();
for (int i = 0; i < blockCount; i++) {
int id = readInt();
String name = id >= 0 ? Integer.toString(id) : NO_BLOCK;
InputBlock block = graph.addBlock(name);
int nodeCount = readInt();
for (int j = 0; j < nodeCount; j++) {
int nodeId = readInt();
if (nodeId < 0) {
continue;
}
final Properties properties = graph.getNode(nodeId).getProperties();
final String oldBlock = properties.get("block");
if(oldBlock != null) {
properties.setProperty("block", oldBlock + ", " + name);
} else {
block.addNode(nodeId);
properties.setProperty("block", name);
}
}
int edgeCount = readInt();
for (int j = 0; j < edgeCount; j++) {
int to = readInt();
edges.add(new Edge(id, to));
}
}
for (Edge e : edges) {
String fromName = e.from >= 0 ? Integer.toString(e.from) : NO_BLOCK;
String toName = e.to >= 0 ? Integer.toString(e.to) : NO_BLOCK;
graph.addBlockEdge(graph.getBlock(fromName), graph.getBlock(toName));
}
}
示例8: getProperties
import com.sun.hotspot.igv.data.Properties; //导入方法依赖的package包/类
@Override
public Properties getProperties() {
Properties p = new Properties();
if (source.getSourceNodes().size() > 0) {
for (InputNode n : source.getSourceNodes()) {
p.add(n.getProperties());
}
} else {
p.setProperty("name", "Slot");
p.setProperty("figure", figure.getProperties().get("name"));
p.setProperty("connectionCount", Integer.toString(connections.size()));
}
return p;
}
示例9: createProperties
import com.sun.hotspot.igv.data.Properties; //导入方法依赖的package包/类
private Properties createProperties(InputEdge edge) {
Properties p = new Properties();
p.setProperty(Parser.TO_INDEX_PROPERTY, Integer.toString(edge.getToIndex()));
p.setProperty(Parser.TO_PROPERTY, Integer.toString(edge.getTo()));
p.setProperty(Parser.FROM_PROPERTY, Integer.toString(edge.getFrom()));
return p;
}
示例10: 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).intern();
String localName = attr.getLocalName(i).intern();
p.setProperty(val, localName);
}
}