Example usage for org.eclipse.jdt.core ToolFactory createDefaultClassFileReader

List of usage examples for org.eclipse.jdt.core ToolFactory createDefaultClassFileReader

Introduction

In this page you can find the example usage for org.eclipse.jdt.core ToolFactory createDefaultClassFileReader.

Prototype

public static IClassFileReader createDefaultClassFileReader(String zipFileName, String zipEntryName,
        int decodingFlag) 

Source Link

Document

Create a default classfile reader, able to expose the internal representation of a given classfile according to the decoding flag used to initialize the reader.

Usage

From source file:org.eclipse.jpt.common.eclipselink.core.internal.libval.EclipseLinkLibraryValidatorTools.java

License:Open Source License

private static IClassFileReader buildClassFileReader(IClasspathEntry entry) {
    return ToolFactory.createDefaultClassFileReader(entry.getPath().toFile().getAbsolutePath(),
            VERSION_CLASS_PATH, IClassFileReader.FIELD_INFOS);
}

From source file:org.eclipse.pde.ui.tests.ee.ExportBundleTests.java

License:Open Source License

/**
 * Validates the target level of a generated class file.
 * //www  .  java 2s .c  o  m
 * @param zipFileName location of archive file
 * @param zipEntryName path to class file in archive
 * @param major expected major class file version
 */
protected void validateTargetLevel(String zipFileName, String zipEntryName, int major) {
    IClassFileReader reader = ToolFactory.createDefaultClassFileReader(zipFileName, zipEntryName,
            IClassFileReader.ALL);
    assertEquals("Wrong major version", major, reader.getMajorVersion());
}