This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 28067 - Provide a fast-and-dirty parser for class/interface inheritance hierarchy
Summary: Provide a fast-and-dirty parser for class/interface inheritance hierarchy
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2002-10-17 09:00 UTC by Petr Jiricka
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2002-10-17 09:00:27 UTC
It would be useful to have a very fast parser for Java 
files, which would not parse the whole file, but only 
enough to determine the class name, its superclass and 
superinterfaces. This partial data about classes could 
also be stored in the MDR.

Such a parser could then be used in the FileObject 
recognition process. So a module could register a 
dataloader that accepts Java classes which extend class 
java.applet.Applet, or classes that implement interface 
javax.servlet.Servlet, and provide functionality specific 
to these files.
Comment 1 Svata Dedic 2002-10-17 13:50:54 UTC
That can be IMHO done for top-level classes, but there may be inner
classes as well. They are quite peculiar, because for top-level
classes, only imports and the package statement determine scope for
identifier resolution. Inner classes may use types inherited from the
outer class' superclasses.
So - quick & dirty: might be, but *only* for top-level classes and
really fast only if only first class in the file is scanned.
Comment 2 Petr Jiricka 2002-10-17 14:37:19 UTC
I think it is sufficient to only do this for the first top 
level class and no inner classes, especially for the 
purpose of recognition by DataLoaders.

The only problem could be if there are multiple top-level 
classes, and the first one is not the public one, but I 
would say this is a corner case which does not need to be 
considered.

Comment 3 Petr Jiricka 2004-02-16 18:34:03 UTC
A question: will it be possible to implement this feature for NB 4.0?
This release will cache the inheritance information in a persistent
storage, so information from this storage could potentially be used by
the dataloader which would like to recognize all servlets, correct?
Thanks.
Comment 4 Martin Matula 2004-02-16 19:27:08 UTC
Yes, that's correct.
Comment 5 Jan Becicka 2004-08-10 16:06:07 UTC
Fixed by new JMI based java model
Comment 6 Quality Engineering 2007-09-20 11:54:37 UTC
Reorganization of java component