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

Quick Search    Search Deep

Source code: javax/ide/model/java/source/tree/HasModifiersT.java


1   /*
2    * @(#)HasModifiersT.java
3    */
4   
5   package javax.ide.model.java.source.tree;
6   
7   import java.util.List;
8   
9   /**
10   * Common supertype for elements that may have modifiers. Note that an
11   * annotation is considered a modifier. <p/>
12   *
13   * @author Andy Yu
14   */
15  public interface HasModifiersT
16    extends Tree
17  {
18    // ----------------------------------------------------------------------
19  
20    /**
21     * Gets the modifiers. Right now, this returns the effective
22     * modifiers rather than the raw modifiers.
23     *
24     * @return The modifiers associated with this object.
25     */
26    public int getModifiers();
27  
28    /**
29     * Adds the modifiers except for INTERFACE, ENUM, and ANNOTATION.
30     *
31     * @param modifiers Valid values come from JavaConstants.ACC_* and are
32     *                  determined on a per-node basis. <p/>
33     *
34     *                  The following modifiers are always ignored:
35     *                  ACC_INTERFACE, ACC_ENUM, ACC_ANNOTATION. In order
36     *                  to set them, you must use the special setter
37     *                  ClassT.setTypeKind(I).
38     *
39     * @throws UnsupportedOperationException if this operation is illegal.
40     */
41    public void addModifiers( int modifiers );
42  
43    /**
44     * Sets the modifiers except for INTERFACE, ENUM, and ANNOTATION.
45     *
46     * @param modifiers Valid values come from JavaConstants.ACC_* and are
47     *                  determined on a per-node basis. <p/>
48     *
49     *                  The following modifiers are always ignored:
50     *                  ACC_INTERFACE, ACC_ENUM, ACC_ANNOTATION. In order
51     *                  to set them, you must use the special setter
52     *                  ClassT.setTypeKind(I).
53     *
54     * @throws UnsupportedOperationException if this operation is illegal.
55     */
56    public void setModifiers( int modifiers );
57  
58    /**
59     * Removes the modifiers.
60     *
61     * @param modifiers Valid values come from JavaConstants.ACC_* and are
62     *                  determined on a per-node basis.
63     *
64     * @throws UnsupportedOperationException if this operation is illegal.
65     */
66    public void removeModifiers( int modifiers );
67  
68    /**
69     * Gets the list of annotations.
70     *
71     * @return The array of annotations on this object. <p/>
72     *
73     * List of AnnotationTs.
74     */
75    public List getAnnotations();
76  
77  
78    // ----------------------------------------------------------------------
79  
80    /**
81     * True if this is public.
82     *
83     * @return True if this is public.
84     */
85    public boolean isPublic();
86  
87    /**
88     * True if this is private.
89     *
90     * @return True if this is private.
91     */
92    public boolean isPrivate();
93  
94    /**
95     * True if this is protected.
96     *
97     * @return True if this is protected.
98     */
99    public boolean isProtected();
100 
101   /**
102    * True if this is static.
103    *
104    * @return True if this is static.
105    */
106   public boolean isStatic();
107 
108   /**
109    * True if this is final.
110    *
111    * @return True if this is final.
112    */
113   public boolean isFinal();
114 
115   /**
116    * True if this is abstract.
117    *
118    * @return True if this is abstract.
119    */
120   public boolean isAbstract();
121 
122   /**
123    * True if this is strictfp.
124    *
125    * @return True if this is strictfp.
126    */
127   public boolean isStrictfp();
128 
129 
130   // ----------------------------------------------------------------------
131 }
132