Example usage for org.objectweb.asm.util Printer appendString

List of usage examples for org.objectweb.asm.util Printer appendString

Introduction

In this page you can find the example usage for org.objectweb.asm.util Printer appendString.

Prototype

public static void appendString(final StringBuilder stringBuilder, final String string) 

Source Link

Document

Appends a quoted string to the given string builder.

Usage

From source file:de.tuberlin.uebb.jbop.optimizer.utils.ClassNodeBuilderTextifier.java

License:Open Source License

@Override
public void visitLdcInsn(final Object cst) {
    buf.setLength(0);//  www . j  a va 2 s .co m
    buf.append("add(").append("LDC, ");
    if (cst instanceof String) {
        Printer.appendString(buf, (String) cst);
    } else if (cst instanceof Type) {
        buf.append(((Type) cst).getDescriptor()).append(".class");
    } else {
        buf.append(cst);
    }
    buf.append(").//\n");
    text.add(buf.toString());
}