KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > spoon > reflect > declaration > CtExecutable


1 package spoon.reflect.declaration;
2
3 import java.util.List JavaDoc;
4 import java.util.Set JavaDoc;
5
6 import spoon.reflect.code.CtBlock;
7 import spoon.reflect.reference.CtExecutableReference;
8 import spoon.reflect.reference.CtTypeReference;
9
10 /**
11  * This element represents an executable element such as a method, a
12  * constructor, or an anonymous block.
13  */

14 public interface CtExecutable<R> extends CtNamedElement, CtGenericElement, CtTypedElement<R> {
15     
16     /**
17      * The separator for a string representation of an executable.
18      */

19     public static final String JavaDoc EXECUTABLE_SEPARATOR = "#";
20
21     /**
22      * Gets the body expression.
23      */

24     CtBlock<R> getBody();
25
26     /**
27      * Gets the declaring type
28      */

29     CtType<?> getDeclaringType();
30
31     /**
32      * Gets the parameters list.
33      */

34     List JavaDoc<CtParameter<?>> getParameters();
35
36     /*
37      * (non-Javadoc)
38      *
39      * @see spoon.reflect.declaration.CtNamedElement#getReference()
40      */

41     CtExecutableReference<R> getReference();
42
43     /**
44      * Returns the exceptions and other throwables listed in this method or
45      * constructor's <tt>throws</tt> clause.
46      */

47     Set JavaDoc<CtTypeReference<? extends Throwable JavaDoc>> getThrownTypes();
48
49     /**
50      * Sets the body expression.
51      */

52     void setBody(CtBlock<R> body);
53
54     /**
55      * Sets the parameters.
56      */

57     void setParameters(List JavaDoc<CtParameter<?>> parameters);
58
59     /**
60      * Sets the thrown types.
61      */

62     void setThrownTypes(Set JavaDoc<CtTypeReference<? extends Throwable JavaDoc>> thrownTypes);
63
64 }
Popular Tags