01: /*
02: * Sun Public License Notice
03: *
04: * The contents of this file are subject to the Sun Public License
05: * Version 1.0 (the "License"). You may not use this file except in
06: * compliance with the License. A copy of the License is available at
07: * http://www.sun.com/
08: *
09: * The Original Code is NetBeans. The Initial Developer of the Original
10: * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
11: * Microsystems, Inc. All Rights Reserved.
12: */
13:
14: package org.netbeans.editor.ext.java;
15:
16: import java.util.List;
17:
18: /**
19: * Java completion finder
20: *
21: * @author Miloslav Metelka
22: * @version 1.00
23: */
24:
25: public interface JCFinder extends JCClassProvider {
26:
27: /** Get the package from the package name */
28: public JCPackage getExactPackage(String packageName);
29:
30: /** Get the class from full name of the class */
31: public JCClass getExactClass(String classFullName);
32:
33: /**
34: * Get the list of packages that start with the given name
35: *
36: * @param name
37: * the start of the requested package(s) name
38: * @return list of the matching packages
39: */
40: public List findPackages(String name, boolean exactMatch,
41: boolean subPackages);
42:
43: /**
44: * Find classes by name and possibly in some package
45: *
46: * @param pkg
47: * package where the classes should be searched for. It can be
48: * null
49: * @param begining
50: * of the name of the class. The package name must be omitted.
51: * @param exactMatch
52: * whether the given name is the exact requested name of the
53: * class or not.
54: * @return list of the matching classes
55: */
56: public List findClasses(JCPackage pkg, String name,
57: boolean exactMatch);
58:
59: /**
60: * Find fields by name in a given class.
61: *
62: * @param c
63: * class which is searched for the fields.
64: * @param name
65: * start of the name of the field
66: * @param exactMatch
67: * whether the given name of the field is exact
68: * @param staticOnly
69: * whether search for the static fields only
70: * @param inspectOuterClasses
71: * if the given class is inner class of some outer class, whether
72: * the fields of the outer class should be possibly added or not.
73: * This should be false when searching for 'this.'
74: * @return list of the matching fields
75: */
76: public List findFields(JCClass c, String name, boolean exactMatch,
77: boolean staticOnly, boolean inspectOuterClasses);
78:
79: /**
80: * Find methods by name in a given class.
81: *
82: * @param c
83: * class which is searched for the methods.
84: * @param name
85: * start of the name of the method
86: * @param exactMatch
87: * whether the given name of the method is exact
88: * @param staticOnly
89: * whether search for the static methods only
90: * @param inspectOuterClasses
91: * if the given class is inner class of some outer class, whether
92: * the methods of the outer class should be possibly added or
93: * not. This should be false when searching for 'this.'
94: * @return list of the matching methods
95: */
96: public List findMethods(JCClass c, String name, boolean exactMatch,
97: boolean staticOnly, boolean inspectOuterClasses);
98:
99: }
|