Search in sources :

Example 1 with DescriptorException

use of com.sun.tools.classfile.DescriptorException in project ceylon-compiler by ceylon.

the class CodeWriter method writeVerboseHeader.

public void writeVerboseHeader(Code_attribute attr, ConstantPool constant_pool) {
    Method method = classWriter.getMethod();
    String argCount;
    try {
        int n = method.descriptor.getParameterCount(constant_pool);
        if (!method.access_flags.is(AccessFlags.ACC_STATIC))
            // for 'this'
            ++n;
        argCount = Integer.toString(n);
    } catch (ConstantPoolException e) {
        argCount = report(e);
    } catch (DescriptorException e) {
        argCount = report(e);
    }
    println("stack=" + attr.max_stack + ", locals=" + attr.max_locals + ", args_size=" + argCount);
}
Also used : DescriptorException(com.sun.tools.classfile.DescriptorException) ConstantPoolException(com.sun.tools.classfile.ConstantPoolException) Method(com.sun.tools.classfile.Method)

Aggregations

ConstantPoolException (com.sun.tools.classfile.ConstantPoolException)1 DescriptorException (com.sun.tools.classfile.DescriptorException)1 Method (com.sun.tools.classfile.Method)1