public interface SourceHasModifiers extends SourceElement
CHILDREN_ALL, CHILDREN_BLANKLINES, CHILDREN_COMMENTS, CHILDREN_default, CHILDREN_none, CHILDREN_REGULAR, EMPTY_ARRAY, PRINT_ALL, REFORMAT_ALL, REFORMAT_INDENT| Modifier and Type | Method and Description | 
|---|---|
void | 
addModifiers(int modifiers)
Adds the modifiers except for INTERFACE, ENUM, and ANNOTATION. 
 | 
int | 
getModifiers()
Gets the modifiers. 
 | 
java.util.List<SourceAnnotation> | 
getSourceAnnotations()
Gets the list of annotations. 
 | 
default boolean | 
hasSourceAnnotation(java.lang.String annotationName)
Determine if this SourceElement has a particular annotation. 
 | 
boolean | 
isValidModifiers(int modifiers)
Determine if the incoming modifiers are valid modifiers for this SourceElement,
 meaning they can be safely set as or added to the modifiers. 
 | 
void | 
removeModifiers(int modifiers)
Removes the modifiers. 
 | 
void | 
setModifiers(int modifiers)
Sets the modifiers except for INTERFACE, ENUM, and ANNOTATION. 
 | 
addSelf, addSelf, addSelfAfter, addSelfBefore, adjustTextIndentation, clearBinding, cloneSelf, compile, createContext, getBinding, getChildren, getChildren, getCompiledObject, getContainedElements, getContext, getEndOffset, getFirstToken, getJdkVersion, getLastToken, getOwningFile, getOwningSourceFile, getParent, getSiblingAfter, getSiblingAfter, getSiblingBefore, getSiblingBefore, getSiblings, getSiblings, getStartOffset, getSymbolKind, getText, getTokens, getTokens, hasErrors, print, print, print, print, reformatSelf, removeSelf, replaceSelf, resolve, setBinding, setContext, visitSelfint getModifiers()
void addModifiers(int modifiers)
modifiers - Valid values come from JavaConstants.ACC_* and are
                  determined on a per-node basis. The following modifiers are always ignored: ACC_INTERFACE, ACC_ENUM, ACC_ANNOTATION. In order to set them, you must use the special setter SourceClass.setTypeKind(I).
java.lang.UnsupportedOperationException - if this operation is illegal.void setModifiers(int modifiers)
modifiers - Valid values come from JavaConstants.ACC_* and are
                  determined on a per-node basis. The following modifiers are always ignored: ACC_INTERFACE, ACC_ENUM, ACC_ANNOTATION. In order to set them, you must use the special setter SourceClass.setTypeKind(I).
java.lang.UnsupportedOperationException - if this operation is illegal.void removeModifiers(int modifiers)
modifiers - Valid values come from JavaConstants.ACC_* and are
                  determined on a per-node basis.java.lang.UnsupportedOperationException - if this operation is illegal.java.util.List<SourceAnnotation> getSourceAnnotations()
boolean isValidModifiers(int modifiers)
modifiers - Modifiers, one or more of of JavaConstants.ACC_*default boolean hasSourceAnnotation(java.lang.String annotationName)
annotationName - An unqualified name, such as "Deprecated" which does
 a quick check that doesn't require resolutions, or a qualified name such
 as "java.lang.annotation.Inherited" which uses resolutions to do its check.