com.sun.hotspot.igv.data.InputMethod Java Examples

The following examples show how to use com.sun.hotspot.igv.data.InputMethod. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MethodNode.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public void update(InputGraph graph, InputMethod method) {
    ((MethodNodeChildren) this.getChildren()).setMethod(method, graph);
    if (method != null) {
        this.setDisplayName(method.getName());
    }

}
 
Example #2
Source File: Printer.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private void export(XMLWriter w, InputMethod method) throws IOException {

        w.startTag(Parser.METHOD_ELEMENT, new Properties(Parser.METHOD_BCI_PROPERTY, method.getBci() + "", Parser.METHOD_NAME_PROPERTY, method.getName(), Parser.METHOD_SHORT_NAME_PROPERTY, method.getShortName()));

        w.writeProperties(method.getProperties());

        if (method.getInlined().size() > 0) {
            w.startTag(Parser.INLINE_ELEMENT);
            for (InputMethod m : method.getInlined()) {
                export(w, m);
            }
            w.endTag();
        }

        w.startTag(Parser.BYTECODES_ELEMENT);

        StringBuilder b = new StringBuilder();
        b.append("<![CDATA[\n");
        for (InputBytecode code : method.getBytecodes()) {
            b.append(code.getBci());
            b.append(" ");
            b.append(code.getName());
            b.append("\n");

        }
        b.append("]]>");
        w.write(b.toString());
        w.endTag();
        w.endTag();
    }
 
Example #3
Source File: Parser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected InputMethod start() throws SAXException {

    InputMethod method = parseMethod(this, getParentObject());
    getParentObject().setMethod(method);
    return method;
}
 
Example #4
Source File: Parser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private InputMethod parseMethod(XMLParser.ElementHandler handler, Group group) throws SAXException {
    String s = handler.readRequiredAttribute(METHOD_BCI_PROPERTY);
    int bci = 0;
    try {
        bci = Integer.parseInt(s);
    } catch (NumberFormatException e) {
        throw new SAXException(e);
    }
    InputMethod method = new InputMethod(group, handler.readRequiredAttribute(METHOD_NAME_PROPERTY), handler.readRequiredAttribute(METHOD_SHORT_NAME_PROPERTY), bci);
    return method;
}
 
Example #5
Source File: Printer.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private void export(XMLWriter w, InputMethod method) throws IOException {

        w.startTag(Parser.METHOD_ELEMENT, new Properties(Parser.METHOD_BCI_PROPERTY, method.getBci() + "", Parser.METHOD_NAME_PROPERTY, method.getName(), Parser.METHOD_SHORT_NAME_PROPERTY, method.getShortName()));

        w.writeProperties(method.getProperties());

        if (method.getInlined().size() > 0) {
            w.startTag(Parser.INLINE_ELEMENT);
            for (InputMethod m : method.getInlined()) {
                export(w, m);
            }
            w.endTag();
        }

        w.startTag(Parser.BYTECODES_ELEMENT);

        StringBuilder b = new StringBuilder();
        b.append("<![CDATA[\n");
        for (InputBytecode code : method.getBytecodes()) {
            b.append(code.getBci());
            b.append(" ");
            b.append(code.getName());
            b.append("\n");

        }
        b.append("]]>");
        w.write(b.toString());
        w.endTag();
        w.endTag();
    }
 
Example #6
Source File: MethodNode.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void update(InputGraph graph, InputMethod method) {
    ((MethodNodeChildren) this.getChildren()).setMethod(method, graph);
    if (method != null) {
        this.setDisplayName(method.getName());
    }

}
 
Example #7
Source File: MethodNode.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of MethodNode */
public MethodNode(InputMethod method, InputGraph graph, String bciString) {
    super((method != null && method.getBytecodes().size() == 0) ? Children.LEAF : new MethodNodeChildren(method, graph, bciString));
    if (method != null) {
        this.setDisplayName(method.getName());
    }
}
 
Example #8
Source File: MethodNode.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public void update(InputGraph graph, InputMethod method) {
    ((MethodNodeChildren) this.getChildren()).setMethod(method, graph);
    if (method != null) {
        this.setDisplayName(method.getName());
    }

}
 
Example #9
Source File: Printer.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private void export(XMLWriter w, InputMethod method) throws IOException {

        w.startTag(Parser.METHOD_ELEMENT, new Properties(Parser.METHOD_BCI_PROPERTY, method.getBci() + "", Parser.METHOD_NAME_PROPERTY, method.getName(), Parser.METHOD_SHORT_NAME_PROPERTY, method.getShortName()));

        w.writeProperties(method.getProperties());

        if (method.getInlined().size() > 0) {
            w.startTag(Parser.INLINE_ELEMENT);
            for (InputMethod m : method.getInlined()) {
                export(w, m);
            }
            w.endTag();
        }

        w.startTag(Parser.BYTECODES_ELEMENT);

        StringBuilder b = new StringBuilder();
        b.append("<![CDATA[\n");
        for (InputBytecode code : method.getBytecodes()) {
            b.append(code.getBci());
            b.append(" ");
            b.append(code.getName());
            b.append("\n");

        }
        b.append("]]>");
        w.write(b.toString());
        w.endTag();
        w.endTag();
    }
 
Example #10
Source File: Parser.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected InputMethod start() throws SAXException {

    InputMethod method = parseMethod(this, getParentObject());
    getParentObject().setMethod(method);
    return method;
}
 
Example #11
Source File: Parser.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private InputMethod parseMethod(XMLParser.ElementHandler handler, Group group) throws SAXException {
    String s = handler.readRequiredAttribute(METHOD_BCI_PROPERTY);
    int bci = 0;
    try {
        bci = Integer.parseInt(s);
    } catch (NumberFormatException e) {
        throw new SAXException(e);
    }
    InputMethod method = new InputMethod(group, handler.readRequiredAttribute(METHOD_NAME_PROPERTY), handler.readRequiredAttribute(METHOD_SHORT_NAME_PROPERTY), bci);
    return method;
}
 
Example #12
Source File: MethodNode.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of MethodNode */
public MethodNode(InputMethod method, InputGraph graph, String bciString) {
    super((method != null && method.getBytecodes().size() == 0) ? Children.LEAF : new MethodNodeChildren(method, graph, bciString));
    if (method != null) {
        this.setDisplayName(method.getName());
    }
}
 
Example #13
Source File: MethodNode.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of MethodNode */
public MethodNode(InputMethod method, InputGraph graph, String bciString) {
    super((method != null && method.getBytecodes().size() == 0) ? Children.LEAF : new MethodNodeChildren(method, graph, bciString));
    if (method != null) {
        this.setDisplayName(method.getName());
    }
}
 
Example #14
Source File: Printer.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private void export(XMLWriter w, InputMethod method) throws IOException {

        w.startTag(Parser.METHOD_ELEMENT, new Properties(Parser.METHOD_BCI_PROPERTY, method.getBci() + "", Parser.METHOD_NAME_PROPERTY, method.getName(), Parser.METHOD_SHORT_NAME_PROPERTY, method.getShortName()));

        w.writeProperties(method.getProperties());

        if (method.getInlined().size() > 0) {
            w.startTag(Parser.INLINE_ELEMENT);
            for (InputMethod m : method.getInlined()) {
                export(w, m);
            }
            w.endTag();
        }

        w.startTag(Parser.BYTECODES_ELEMENT);

        StringBuilder b = new StringBuilder();
        b.append("<![CDATA[\n");
        for (InputBytecode code : method.getBytecodes()) {
            b.append(code.getBci());
            b.append(" ");
            b.append(code.getName());
            b.append("\n");

        }
        b.append("]]>");
        w.write(b.toString());
        w.endTag();
        w.endTag();
    }
 
Example #15
Source File: Parser.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected InputMethod start() throws SAXException {

    InputMethod method = parseMethod(this, getParentObject());
    getParentObject().setMethod(method);
    return method;
}
 
Example #16
Source File: Parser.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private InputMethod parseMethod(XMLParser.ElementHandler handler, Group group) throws SAXException {
    String s = handler.readRequiredAttribute(METHOD_BCI_PROPERTY);
    int bci = 0;
    try {
        bci = Integer.parseInt(s);
    } catch (NumberFormatException e) {
        throw new SAXException(e);
    }
    InputMethod method = new InputMethod(group, handler.readRequiredAttribute(METHOD_NAME_PROPERTY), handler.readRequiredAttribute(METHOD_SHORT_NAME_PROPERTY), bci);
    return method;
}
 
Example #17
Source File: MethodNode.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of MethodNode */
public MethodNode(InputMethod method, InputGraph graph, String bciString) {
    super((method != null && method.getBytecodes().size() == 0) ? Children.LEAF : new MethodNodeChildren(method, graph, bciString));
    if (method != null) {
        this.setDisplayName(method.getName());
    }
}
 
Example #18
Source File: MethodNode.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void update(InputGraph graph, InputMethod method) {
    ((MethodNodeChildren) this.getChildren()).setMethod(method, graph);
    if (method != null) {
        this.setDisplayName(method.getName());
    }

}
 
Example #19
Source File: Printer.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private void export(XMLWriter w, InputMethod method) throws IOException {

        w.startTag(Parser.METHOD_ELEMENT, new Properties(Parser.METHOD_BCI_PROPERTY, method.getBci() + "", Parser.METHOD_NAME_PROPERTY, method.getName(), Parser.METHOD_SHORT_NAME_PROPERTY, method.getShortName()));

        w.writeProperties(method.getProperties());

        if (method.getInlined().size() > 0) {
            w.startTag(Parser.INLINE_ELEMENT);
            for (InputMethod m : method.getInlined()) {
                export(w, m);
            }
            w.endTag();
        }

        w.startTag(Parser.BYTECODES_ELEMENT);

        StringBuilder b = new StringBuilder();
        b.append("<![CDATA[\n");
        for (InputBytecode code : method.getBytecodes()) {
            b.append(code.getBci());
            b.append(" ");
            b.append(code.getName());
            b.append("\n");

        }
        b.append("]]>");
        w.write(b.toString());
        w.endTag();
        w.endTag();
    }
 
Example #20
Source File: Parser.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected InputMethod start() throws SAXException {

    InputMethod method = parseMethod(this, getParentObject());
    getParentObject().setMethod(method);
    return method;
}
 
Example #21
Source File: Parser.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private InputMethod parseMethod(XMLParser.ElementHandler handler, Group group) throws SAXException {
    String s = handler.readRequiredAttribute(METHOD_BCI_PROPERTY);
    int bci = 0;
    try {
        bci = Integer.parseInt(s);
    } catch (NumberFormatException e) {
        throw new SAXException(e);
    }
    InputMethod method = new InputMethod(group, handler.readRequiredAttribute(METHOD_NAME_PROPERTY), handler.readRequiredAttribute(METHOD_SHORT_NAME_PROPERTY), bci);
    return method;
}
 
Example #22
Source File: MethodNode.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of MethodNode */
public MethodNode(InputMethod method, InputGraph graph, String bciString) {
    super((method != null && method.getBytecodes().size() == 0) ? Children.LEAF : new MethodNodeChildren(method, graph, bciString));
    if (method != null) {
        this.setDisplayName(method.getName());
    }
}
 
Example #23
Source File: MethodNode.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public void update(InputGraph graph, InputMethod method) {
    ((MethodNodeChildren) this.getChildren()).setMethod(method, graph);
    if (method != null) {
        this.setDisplayName(method.getName());
    }

}
 
Example #24
Source File: MethodNode.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of MethodNode */
public MethodNode(InputMethod method, InputGraph graph, String bciString) {
    super((method != null && method.getBytecodes().size() == 0) ? Children.LEAF : new MethodNodeChildren(method, graph, bciString));
    if (method != null) {
        this.setDisplayName(method.getName());
    }
}
 
Example #25
Source File: Parser.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected InputMethod start() throws SAXException {

    InputMethod method = parseMethod(this, getParentObject());
    getParentObject().setMethod(method);
    return method;
}
 
Example #26
Source File: Parser.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private InputMethod parseMethod(XMLParser.ElementHandler handler, Group group) throws SAXException {
    String s = handler.readRequiredAttribute(METHOD_BCI_PROPERTY);
    int bci = 0;
    try {
        bci = Integer.parseInt(s);
    } catch (NumberFormatException e) {
        throw new SAXException(e);
    }
    InputMethod method = new InputMethod(group, handler.readRequiredAttribute(METHOD_NAME_PROPERTY), handler.readRequiredAttribute(METHOD_SHORT_NAME_PROPERTY), bci);
    return method;
}
 
Example #27
Source File: MethodNode.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of MethodNode */
public MethodNode(InputMethod method, InputGraph graph, String bciString) {
    super((method != null && method.getBytecodes().size() == 0) ? Children.LEAF : new MethodNodeChildren(method, graph, bciString));
    if (method != null) {
        this.setDisplayName(method.getName());
    }
}
 
Example #28
Source File: MethodNode.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void update(InputGraph graph, InputMethod method) {
    ((MethodNodeChildren) this.getChildren()).setMethod(method, graph);
    if (method != null) {
        this.setDisplayName(method.getName());
    }

}
 
Example #29
Source File: Printer.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private void export(XMLWriter w, InputMethod method) throws IOException {

        w.startTag(Parser.METHOD_ELEMENT, new Properties(Parser.METHOD_BCI_PROPERTY, method.getBci() + "", Parser.METHOD_NAME_PROPERTY, method.getName(), Parser.METHOD_SHORT_NAME_PROPERTY, method.getShortName()));

        w.writeProperties(method.getProperties());

        if (method.getInlined().size() > 0) {
            w.startTag(Parser.INLINE_ELEMENT);
            for (InputMethod m : method.getInlined()) {
                export(w, m);
            }
            w.endTag();
        }

        w.startTag(Parser.BYTECODES_ELEMENT);

        StringBuilder b = new StringBuilder();
        b.append("<![CDATA[\n");
        for (InputBytecode code : method.getBytecodes()) {
            b.append(code.getBci());
            b.append(" ");
            b.append(code.getName());
            b.append("\n");

        }
        b.append("]]>");
        w.write(b.toString());
        w.endTag();
        w.endTag();
    }
 
Example #30
Source File: Parser.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected InputMethod start() throws SAXException {

    InputMethod method = parseMethod(this, getParentObject());
    getParentObject().setMethod(method);
    return method;
}