Example usage for org.eclipse.jdt.internal.compiler ClassFile ClassFile

List of usage examples for org.eclipse.jdt.internal.compiler ClassFile ClassFile

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler ClassFile ClassFile.

Prototype

protected ClassFile() 

Source Link

Document

INTERNAL USE-ONLY This methods creates a new instance of the receiver.

Usage

From source file:org.eclipse.objectteams.otdt.internal.core.compiler.bytecode.AbstractAttribute.java

License:Open Source License

/** Write the attribute into an allocated array of bytes. */
public void generate(byte[] target, int offset, ConstantPool constantPool) {
    ClassFile dummyClass = new ClassFile() {
        /* empty body */};
    dummyClass.contents = target;//ww  w.ja  v  a 2 s .c o  m
    dummyClass.contentsOffset = offset;
    dummyClass.constantPool = constantPool;
    write(dummyClass);
}