Bug 112617 - [API] Add ToolFactory.createDefaultClassFileReader(InputStream,int)
Summary: [API] Add ToolFactory.createDefaultClassFileReader(InputStream,int)
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M3   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-14 08:33 EDT by Dirk Baeumer CLA
Modified: 2005-10-31 06:12 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Baeumer CLA 2005-10-14 08:33:33 EDT
To convert JDT/UI to EFS we need this additional API.
Comment 1 Olivier Thomann CLA 2005-10-14 10:14:21 EDT
Would this be fine?
/**
 * 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.
 * Answer null if the uri is invalid or doesn't correspond to a .class file.
 * 
 * The decoding flags are described in IClassFileReader.
 * 
 * @param uri the given uri that refers to the corresponding IClassfile
 * @param decodingFlag the flag used to decode the class file reader.
 * @return a default classfile reader
 * 
 * @see IClassFileReader
 */
public static IClassFileReader createDefaultClassFileReader(URI, int)
Comment 2 Olivier Thomann CLA 2005-10-14 10:31:15 EDT
Would it be fine to pass a java.io.InputStream instead of an URI?
Comment 3 Olivier Thomann CLA 2005-10-14 11:03:55 EDT
Using an input stream seems to be a more general approach. I will update the
title accordingly.
Fixed and released in HEAD.
Regression test added in
org.eclipse.jdt.core.tests.compiler.regression.ClassFileReaderTest.test083.

There is no new API for the one that refers to a zip file entry.
Comment 4 Frederic Fusier CLA 2005-10-31 06:12:09 EST
Verified for 3.2 M3 using build I20051031-0010