Logo Search packages:      
Sourcecode: jardiff version File versions  Download package

void org::osjava::jardiff::StreamDiffHandler::addTypeNode ( Type  type  )  throws IOException [inline, protected]

Add a type node for the specified type. This writes out a <type> node with attributes describing the type.

Parameters:
type The type to describe.
Exceptions:
IOException when there is an underlying IOException.

Definition at line 712 of file StreamDiffHandler.java.

References out, and xmlEscape().

                                                             {
        out.write("<type");
        int i = type.getSort();
        if (i == Type.ARRAY) {
            out.write(" array=\"yes\" dimensions=\"");
            out.write(""+type.getDimensions());
            out.write("\"");
            type = type.getElementType();
            i = type.getSort();
        }
        switch (i) {
        case Type.BOOLEAN:
            out.write(" primitive=\"yes\" name=\"boolean\"/>");
            break;
        case Type.BYTE:
            out.write(" primitive=\"yes\" name=\"byte\"/>");
            break;
        case Type.CHAR:
            out.write(" primitive=\"yes\" name=\"char\"/>");
            break;
        case Type.DOUBLE:
            out.write(" primitive=\"yes\" name=\"double\"/>");
            break;
        case Type.FLOAT:
            out.write(" primitive=\"yes\" name=\"float\"/>");
            break;
        case Type.INT:
            out.write(" primitive=\"yes\" name=\"int\"/>");
            break;
        case Type.LONG:
            out.write(" primitive=\"yes\" name=\"long\"/>");
            break;
        case Type.OBJECT:
            out.write(" name=\"");
            out.write(xmlEscape(type.getInternalName()));
            out.write("\"/>");
            break;
        case Type.SHORT:
            out.write(" primitive=\"yes\" name=\"short\"/>");
            break;
        case Type.VOID:
            out.write(" primitive=\"yes\" name=\"void\"/>");
            break;
        }
    }


Generated by  Doxygen 1.6.0   Back to index