KickJava   Java API By Example, From Geeks To Geeks.

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


1 package spoon.reflect.declaration;
2
3 import java.util.Set JavaDoc;
4
5 /**
6  * This interface defines an element that accepts modifiers.
7  */

8 public interface CtModifiable {
9     /**
10      * Returns the modifiers of this element, excluding annotations. Implicit
11      * modifiers, such as the {@code public} and {@code static} modifiers of
12      * interface members, are included.
13      *
14      * @return the modifiers of this declaration in undefined order; an empty
15      * set if there are none
16      */

17     Set JavaDoc<ModifierKind> getModifiers();
18
19     /**
20      * Tells if this element contains the given modifier.
21      *
22      * @param modifier
23      * to search
24      * @return {@code true} if this element contain the modifier
25      */

26     boolean hasModifier(ModifierKind modifier);
27
28     /**
29      * Sets the modifiers.
30      */

31     void setModifiers(Set JavaDoc<ModifierKind> modifiers);
32
33     /**
34      * Sets the visibility of this modifiable element (replaces old visibility).
35      */

36     void setVisibility(ModifierKind visibility);
37
38     /**
39      * Gets the visibility of this modifiable element.
40      */

41     ModifierKind getVisibility();
42 }
43
Popular Tags