KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > verifier > apiscan > classfile > Method


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24
25 package com.sun.enterprise.tools.verifier.apiscan.classfile;
26
27 import java.util.Collection JavaDoc;
28
29 /**
30  * @author Sanjeeb.Sahoo@Sun.COM
31  */

32 public interface Method {
33     /**
34      * @return the {@link ClassFile} this method belongs to.
35      */

36     ClassFile getOwningClass();
37
38     /**
39      * @return the name of the method.
40      */

41     String JavaDoc getName();
42
43     /**
44      * @return return the descriptor, e.g. ([Ljava.lang.String;)V
45      */

46     String JavaDoc getDescriptor();
47
48     /**
49      * @return return the access flags.
50      */

51     int getAccess();
52
53     /**
54      * Used only when method's parameters or return type use generics.
55      * @return
56      */

57     String JavaDoc getSignature();
58
59     /**
60      * @return the internal names of the method's exception classes. May be null.
61      */

62     String JavaDoc[] getExceptions();
63
64     /**
65      *
66      * @return an unmodifiable collection of method references representing
67      * the methods that are invoked directly (i.e. not recurssively) from this
68      * method.
69      */

70     Collection JavaDoc<MethodRef> getReferencedMethods();
71
72     /**
73      *
74      * @return an unmodifiable collection of class names in external format
75      * representing the classes that are directly (i.e. not recurssively)
76      * referenced by this method.
77      */

78     Collection JavaDoc<String JavaDoc> getReferencedClasses();
79
80     /**
81      * @return a reference that represents this method.
82      */

83     MethodRef getSelfReference();
84
85     /**
86      *
87      * @return true if this is a native method else false
88      */

89     boolean isNative();
90
91 }
92
Popular Tags