make/jdk/src/classes/build/tools/jdwpgen/ConstantNode.java
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 47216 71c04702a3d5
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
    52         writer.println("static final int " + name + " = " +
    52         writer.println("static final int " + name + " = " +
    53                        nameNode.value() + ";");
    53                        nameNode.value() + ";");
    54     }
    54     }
    55 
    55 
    56     void document(PrintWriter writer) {
    56     void document(PrintWriter writer) {
    57 
       
    58         //Add anchor to each constant with format <constant table name>_<constant name>
    57         //Add anchor to each constant with format <constant table name>_<constant name>
    59         writer.println("<tr><td>" + name + "<td>" + nameNode.value() +
    58         if (!(parent instanceof AbstractNamedNode)) {
    60                        "<td>" + comment() + " &nbsp;");
    59             error("Parent must be ConstantSetNode, but it's " + parent.getClass().getSimpleName());
       
    60         }
       
    61         String tableName = ((AbstractNamedNode)parent).name;
       
    62         writer.println("<tr>"
       
    63                         + "<th scope=\"row\">"
       
    64                             + "<span id=\"" + tableName + "_" + name + "\"></span>"
       
    65                             + name
       
    66                         + "<td class=\"centered\">" + nameNode.value()
       
    67                         + "<td>" + comment() + "&nbsp;"
       
    68                     + "</tr>");
    61     }
    69     }
    62 
    70 
    63     public String getName(){
    71     public String getName(){
    64 
    72 
    65         if (name == null || name.length() == 0) {
    73         if (name == null || name.length() == 0) {