oracle.jdeveloper.jot
Interface JotHasModifiers
- All Known Subinterfaces:
- JotAnonymousClass, JotClass, JotClassInitializer, JotConstructor, JotFieldDeclaration, JotInnerClass, JotLocalClass, JotLocalVariableDeclaration, JotMember, JotMethod, JotParameter, JotVariableDeclaration
- public interface JotHasModifiers
The JotHasModifiers interface indicates any JOT object that has modifiers. Examples of objects that can have modifiers include classes, fields, methods, and variable declarations. Not all modifiers are legal for all objects. For example, the only legal modifer for a variable is final
, and fields cannot be native
or synchronized
.
- See Also:
Modifier
Method Summary |
int |
getModifiers()
Retrieves the Java modifiers declared for this member, encoded as a mask. |
java.lang.String |
getModifierText()
|
void |
setModifiers(int mods)
Sets the Java modifiers for this member, encoded as a mask. |
void |
setModifierText(java.lang.String modifierText)
|
getModifiers
public int getModifiers()
throws JotInvalidElementException
- Retrieves the Java modifiers declared for this member, encoded as a mask. The value is encoded using the values specified in
java.lang.reflect.Modifier
; use the methods provided by Modifier
to decode the value (for example, Modifier.isPublic()
).
-
- Throws:
JotInvalidElementException
- See Also:
Modifier
setModifiers
public void setModifiers(int mods)
throws JotInvalidElementException,
JotException
- Sets the Java modifiers for this member, encoded as a mask. The value is encoded using the values specified in
java.lang.reflect.Modifier
.
-
- Parameters:
mods
- the new modifiers mask.
- Throws:
JotInvalidElementException
JotException
getModifierText
public java.lang.String getModifierText()
throws JotInvalidElementException
-
- Returns:
- the actual text of the modifiers.
- Throws:
JotInvalidElementException
setModifierText
public void setModifierText(java.lang.String modifierText)
throws JotInvalidElementException
-
- Throws:
JotInvalidElementException
Copyright © 1997, 2004, Oracle. All rights reserved.