Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: fzi/injectj/access/MOPAccess.java


1   // This file is part of the Inject/J project
2   // (C) 1999-2001 Forschungszentrum Informatik (FZI) Karlsruhe
3   // Please visit our website at http://injectj.fzi.de
4   
5   package fzi.injectj.access;
6   
7   import fzi.injectj.access.PanelAccess;
8   import fzi.injectj.config.ParseMessageDialog;
9   import fzi.injectj.weavepoint.RootWeavepoint;
10  import java.io.FilenameFilter;
11  import javax.swing.JTree;
12  import java.util.*;
13  
14  /** This interface provides access to the currently used metaobjectprotocol.
15    * An implementation of this interface is required for each MOP. Inject/J
16    * uses this as an entrance point to work with diffrent MOPs.
17    * @see fzi.injectj.access.compost.CompostAccess
18    *
19    * @author Volker Kuttruff
20    */
21  public interface MOPAccess
22  {
23    /** Provides access to the currently used PanelAccess object. The appearance
24      * of the Inject/J wizard can be configured through this PanelAccess object.
25      * It's possible to change the diffrent panels according to the used MOP.
26      *
27      * @return the PanelAccess object used with this MOP.
28      */
29    public PanelAccess getPanelAccess();
30  
31    /** Parses all Java-files which are accepted by the given FilenameFilter.
32      * Searching all reachable files must be done by the MOP or the IDE the MOP
33      * is integrated in. The modal message dialog can be used to block the wizard while
34      * parsing Java source. It can also be used to show the currently parsing file.
35      *
36      * @param mopSourcePaths Classpath for the underlying MOP
37      * @param fileFilter filter for Java files to parse
38      * @param messageDialog modal message dialog to show informations about progress, and
39      *                      to block the wizard thread (if an own parse thread is started).
40      *                      Is null if Inject/J is running in quiet mode.
41      * @return true, if all files are parsed successfully, false otherwise
42      */
43    public boolean parseJavaSourceFiles(Vector mopSourcePaths, FilenameFilter filenameFilter, ParseMessageDialog messageDialog);
44  
45    /** Returns amount of currently parsed classes
46     * @return amount of parsed classes
47     */
48    public int getClassCount();
49  
50    /** Returns classname enumeration of all currently parsed classes.
51      *
52      * @return enumeration of all classnames
53      */
54    public Enumeration allClassNames();
55  
56    /** Returns tree of all classes/packages parsed so far. This method is used
57      * to select classes using a GUI. Adding the string user objects of each node,
58      * seperated by a dot, must result in the full qualified name of the class or
59      * package.
60      * @see fzi.injectj.config.ClassChooser
61      * @return classtree containing all parsed classes/packages
62      */
63    public JTree getClassTree();
64  
65    /** Returns the mop represantation of a previously parsed class.
66      *
67      * @param classname the qualified classname
68      * @return the mop representation of the class, or null if class wasn't found
69      */
70    public Object getMOPClass(String classname);
71  
72    /** Returns the root node of the metaobjectprotocol. This root object is the
73      * starting point for all navigation actions.
74      *
75      * @param namespace all classes which should be accessible through navigation.
76      *                  This namespace hashtable can be retrieved through
77      *                  ProjectConfig.getNamespaceClasses().
78      * @return the root node of the metaobjectprotocol encapsulation
79      */
80    public RootWeavepoint getRoot(Hashtable namespace);
81  }