Class Modifier
java.lang.Object
org.aspectj.org.eclipse.jdt.core.dom.ASTNode
org.aspectj.org.eclipse.jdt.core.dom.Modifier
- All Implemented Interfaces:
IExtendedModifier
Modifier node.
Modifier: public protected private static abstract final native synchronized transient volatile strictfp default sealed non-sealed
The numeric values of these flags match the ones for class
files as described in the Java Virtual Machine Specification
(except for DEFAULT). Note that the Java model class
Flags also provides the same
constants as this class.
- Since:
- 2.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classModifier keywords (typesafe enumeration). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int"abstract" modifier constant (bit mask).static final int"default" modifier constant (bit mask) (added in JLS8 API).static final int"final" modifier constant (bit mask).static final SimplePropertyDescriptorThe "keyword" structural property of this node type (type:Modifier.ModifierKeyword).static final int"module" modifier constant (bit mask).static final int"native" modifier constant (bit mask).static final int"non-sealed" modifier constant (bit mask).static final intModifier constant (bit mask, value 0) indicating no modifiers.static final int"private" modifier constant (bit mask).static final int"protected" modifier constant (bit mask).static final int"public" modifier constant (bit mask).static final int"sealed" modifier constant (bit mask).static final int"static" modifier constant (bit mask).static final int"strictfp" modifier constant (bit mask).static final int"synchronized" modifier constant (bit mask).static final int"transient" modifier constant (bit mask).static final int"volatile" modifier constant (bit mask).Fields inherited from class ASTNode
ANNOTATION_TYPE_DECLARATION, ANNOTATION_TYPE_MEMBER_DECLARATION, ANONYMOUS_CLASS_DECLARATION, ARRAY_ACCESS, ARRAY_CREATION, ARRAY_INITIALIZER, ARRAY_TYPE, ASSERT_STATEMENT, ASSIGNMENT, BLOCK, BLOCK_COMMENT, BOOLEAN_LITERAL, BREAK_STATEMENT, CASE_DEFAULT_EXPRESSION, CAST_EXPRESSION, CATCH_CLAUSE, CHARACTER_LITERAL, CLASS_INSTANCE_CREATION, COMPILATION_UNIT, CONDITIONAL_EXPRESSION, CONSTRUCTOR_INVOCATION, CONTINUE_STATEMENT, CREATION_REFERENCE, DIMENSION, DO_STATEMENT, EitherOr_MultiPattern, EMPTY_STATEMENT, ENHANCED_FOR_STATEMENT, ENUM_CONSTANT_DECLARATION, ENUM_DECLARATION, EXPORTS_DIRECTIVE, EXPRESSION_METHOD_REFERENCE, EXPRESSION_STATEMENT, FIELD_ACCESS, FIELD_DECLARATION, FOR_STATEMENT, GUARDED_PATTERN, IF_STATEMENT, IMPORT_DECLARATION, INFIX_EXPRESSION, INITIALIZER, INSTANCEOF_EXPRESSION, INTERSECTION_TYPE, JAVADOC, JAVADOC_REGION, JAVADOC_TEXT_ELEMENT, LABELED_STATEMENT, LAMBDA_EXPRESSION, LINE_COMMENT, MALFORMED, MARKER_ANNOTATION, MEMBER_REF, MEMBER_VALUE_PAIR, METHOD_DECLARATION, METHOD_INVOCATION, METHOD_REF, METHOD_REF_PARAMETER, MODIFIER, MODULE_DECLARATION, MODULE_MODIFIER, MODULE_QUALIFIED_NAME, NAME_QUALIFIED_TYPE, NORMAL_ANNOTATION, NULL_LITERAL, NULL_PATTERN, NUMBER_LITERAL, OPENS_DIRECTIVE, ORIGINAL, PACKAGE_DECLARATION, PARAMETERIZED_TYPE, PARENTHESIZED_EXPRESSION, PATTERN_INSTANCEOF_EXPRESSION, POSTFIX_EXPRESSION, PREFIX_EXPRESSION, PRIMITIVE_TYPE, PROTECT, PROVIDES_DIRECTIVE, QUALIFIED_NAME, QUALIFIED_TYPE, RECORD_DECLARATION, RECORD_PATTERN, RECOVERED, REQUIRES_DIRECTIVE, RETURN_STATEMENT, SIMPLE_NAME, SIMPLE_TYPE, SINGLE_MEMBER_ANNOTATION, SINGLE_VARIABLE_DECLARATION, STRING_LITERAL, SUPER_CONSTRUCTOR_INVOCATION, SUPER_FIELD_ACCESS, SUPER_METHOD_INVOCATION, SUPER_METHOD_REFERENCE, SWITCH_CASE, SWITCH_EXPRESSION, SWITCH_STATEMENT, SYNCHRONIZED_STATEMENT, TAG_ELEMENT, TAG_PROPERTY, TEXT_BLOCK, TEXT_ELEMENT, THIS_EXPRESSION, THROW_STATEMENT, TRY_STATEMENT, TYPE_DECLARATION, TYPE_DECLARATION_STATEMENT, TYPE_LITERAL, TYPE_METHOD_REFERENCE, TYPE_PARAMETER, TYPE_PATTERN, UNION_TYPE, UNNAMED_CLASS, USES_DIRECTIVE, VARIABLE_DECLARATION_EXPRESSION, VARIABLE_DECLARATION_FRAGMENT, VARIABLE_DECLARATION_STATEMENT, WHILE_STATEMENT, WILDCARD_TYPE, YIELD_STATEMENTModifier and TypeFieldDescriptionstatic final intNode type constant indicating a node of typeAnnotationTypeDeclaration.static final intNode type constant indicating a node of typeAnnotationTypeMemberDeclaration.static final intNode type constant indicating a node of typeAnonymousClassDeclaration.static final intNode type constant indicating a node of typeArrayAccess.static final intNode type constant indicating a node of typeArrayCreation.static final intNode type constant indicating a node of typeArrayInitializer.static final intNode type constant indicating a node of typeArrayType.static final intNode type constant indicating a node of typeAssertStatement.static final intNode type constant indicating a node of typeAssignment.static final intNode type constant indicating a node of typeBlock.static final intNode type constant indicating a node of typeBlockComment.static final intNode type constant indicating a node of typeBooleanLiteral.static final intNode type constant indicating a node of typeBreakStatement.static final intNode type constant indicating a node of typeCaseDefaultExpression.static final intNode type constant indicating a node of typeCastExpression.static final intNode type constant indicating a node of typeCatchClause.static final intNode type constant indicating a node of typeCharacterLiteral.static final intNode type constant indicating a node of typeClassInstanceCreation.static final intNode type constant indicating a node of typeCompilationUnit.static final intNode type constant indicating a node of typeConditionalExpression.static final intNode type constant indicating a node of typeConstructorInvocation.static final intNode type constant indicating a node of typeContinueStatement.static final intNode type constant indicating a node of typeCreationReference.static final intNode type constant indicating a node of typeDimension.static final intNode type constant indicating a node of typeDoStatement.static final intNode type constant indicating a node of typeEitherOrMultiPattern.static final intNode type constant indicating a node of typeEmptyStatement.static final intNode type constant indicating a node of typeEnhancedForStatement.static final intNode type constant indicating a node of typeEnumConstantDeclaration.static final intNode type constant indicating a node of typeEnumDeclaration.static final intNode type constant indicating a node of typeExportsDirective.static final intNode type constant indicating a node of typeExpressionMethodReference.static final intNode type constant indicating a node of typeExpressionStatement.static final intNode type constant indicating a node of typeFieldAccess.static final intNode type constant indicating a node of typeFieldDeclaration.static final intNode type constant indicating a node of typeForStatement.static final intNode type constant indicating a node of typeGuardedPattern.static final intNode type constant indicating a node of typeIfStatement.static final intNode type constant indicating a node of typeImportDeclaration.static final intNode type constant indicating a node of typeInfixExpression.static final intNode type constant indicating a node of typeInitializer.static final intNode type constant indicating a node of typeInstanceofExpression.static final intNode type constant indicating a node of typeIntersectionType.static final intNode type constant indicating a node of typeJavadoc.static final intNode type constant indicating a node of typeJavaDocRegion.static final intNode type constant indicating a node of typeTextElement.static final intNode type constant indicating a node of typeLabeledStatement.static final intNode type constant indicating a node of typeLambdaExpression.static final intNode type constant indicating a node of typeLineComment.static final intFlag constant (bit mask, value 1) indicating that there is something not quite right with this AST node.static final intNode type constant indicating a node of typeMarkerAnnotation.static final intNode type constant indicating a node of typeMemberRef.static final intNode type constant indicating a node of typeMemberValuePair.static final intNode type constant indicating a node of typeMethodDeclaration.static final intNode type constant indicating a node of typeMethodInvocation.static final intNode type constant indicating a node of typeMethodRef.static final intNode type constant indicating a node of typeMethodRefParameter.static final intNode type constant indicating a node of typeModifier.static final intNode type constant indicating a node of typeModuleDeclaration.static final intNode type constant indicating a node of typeModuleModifier.static final intNode type constant indicating a node of typeModuleQualifiedName.static final intNode type constant indicating a node of typeNameQualifiedType.static final intNode type constant indicating a node of typeNormalAnnotation.static final intNode type constant indicating a node of typeNullLiteral.static final intNode type constant indicating a node of typeNullPattern.static final intNode type constant indicating a node of typeNumberLiteral.static final intNode type constant indicating a node of typeOpensDirective.static final intFlag constant (bit mask, value 2) indicating that this is a node that was created by the parser (as opposed to one created by another party).static final intNode type constant indicating a node of typePackageDeclaration.static final intNode type constant indicating a node of typeParameterizedType.static final intNode type constant indicating a node of typeParenthesizedExpression.static final intNode type constant indicating a node of typePatternInstanceofExpression.static final intNode type constant indicating a node of typePostfixExpression.static final intNode type constant indicating a node of typePrefixExpression.static final intNode type constant indicating a node of typePrimitiveType.static final intFlag constant (bit mask, value 4) indicating that this node is unmodifiable.static final intNode type constant indicating a node of typeProvidesDirective.static final intNode type constant indicating a node of typeQualifiedName.static final intNode type constant indicating a node of typeQualifiedType.static final intNode type constant indicating a node of typeRecordDeclaration.static final intNode type constant indicating a node of typeRecordPattern.static final intFlag constant (bit mask, value 8) indicating that this node or a part of this node is recovered from source that contains a syntax error detected in the vicinity.static final intNode type constant indicating a node of typeRequiresDirective.static final intNode type constant indicating a node of typeReturnStatement.static final intNode type constant indicating a node of typeSimpleName.static final intNode type constant indicating a node of typeSimpleType.static final intNode type constant indicating a node of typeSingleMemberAnnotation.static final intNode type constant indicating a node of typeSingleVariableDeclaration.static final intNode type constant indicating a node of typeStringLiteral.static final intNode type constant indicating a node of typeSuperConstructorInvocation.static final intNode type constant indicating a node of typeSuperFieldAccess.static final intNode type constant indicating a node of typeSuperMethodInvocation.static final intNode type constant indicating a node of typeSuperMethhodReference.static final intNode type constant indicating a node of typeSwitchCase.static final intNode type constant indicating a node of typeSwitchExpression.static final intNode type constant indicating a node of typeSwitchStatement.static final intNode type constant indicating a node of typeSynchronizedStatement.static final intNode type constant indicating a node of typeTagElement.static final intNode type constant indicating a node of typeTagProperty.static final intNode type constant indicating a node of typeTextBlock.static final intNode type constant indicating a node of typeTextElement.static final intNode type constant indicating a node of typeThisExpression.static final intNode type constant indicating a node of typeThrowStatement.static final intNode type constant indicating a node of typeTryStatement.static final intNode type constant indicating a node of typeTypeDeclaration.static final intNode type constant indicating a node of typeTypeDeclarationStatement.static final intNode type constant indicating a node of typeTypeLiteral.static final intNode type constant indicating a node of typeTypeMethodReference.static final intNode type constant indicating a node of typeTypeParameter.static final intNode type constant indicating a node of typeTypePattern.static final intNode type constant indicating a node of typeUnionType.static final intstatic final intNode type constant indicating a node of typeUsesDirective.static final intNode type constant indicating a node of typeVariableDeclarationExpression.static final intNode type constant indicating a node of typeVariableDeclarationFragment.static final intNode type constant indicating a node of typeVariableDeclarationStatement.static final intNode type constant indicating a node of typeWhileStatement.static final intNode type constant indicating a node of typeWildcardType.static final intNode type constant indicating a node of typeYieldStatement. -
Method Summary
Modifier and TypeMethodDescriptionReturns the modifier keyword of this modifier node.booleanAnswer true if the receiver is the abstract modifier, false otherwise.static booleanisAbstract(int flags) Returns whether the given flags includes the "abstract" modifier.booleanReturns whether this extended modifier is an annotation.booleanAnswer true if the receiver is the default modifier, false otherwise.static booleanisDefault(int flags) Returns whether the given flags includes the "default" modifier.booleanisFinal()Answer true if the receiver is the final modifier, false otherwise.static booleanisFinal(int flags) Returns whether the given flags includes the "final" modifier.booleanReturns whether this extended modifier is a standard modifier.static booleanisModule(int flags) Answer true if the receiver is the module modifier, false otherwise.booleanisNative()Answer true if the receiver is the native modifier, false otherwise.static booleanisNative(int flags) Returns whether the given flags includes the "native" modifier.booleanAnswer true if the receiver is the non-sealed modifier, false otherwise.static booleanisNonSealed(int flags) Returns whether the given flags includes the "non-sealed" modifier.booleanAnswer true if the receiver is the private modifier, false otherwise.static booleanisPrivate(int flags) Returns whether the given flags includes the "private" modifier.booleanAnswer true if the receiver is the protected modifier, false otherwise.static booleanisProtected(int flags) Returns whether the given flags includes the "protected" modifier.booleanisPublic()Answer true if the receiver is the public modifier, false otherwise.static booleanisPublic(int flags) Returns whether the given flags includes the "public" modifier.booleanisSealed()Answer true if the receiver is the sealed modifier, false otherwise.static booleanisSealed(int flags) Returns whether the given flags includes the "sealed" modifier.booleanisStatic()Answer true if the receiver is the static modifier, false otherwise.static booleanisStatic(int flags) Returns whether the given flags includes the "static" modifier.booleanAnswer true if the receiver is the strictfp modifier, false otherwise.static booleanisStrictfp(int flags) Returns whether the given flags includes the "strictfp" modifier.booleanAnswer true if the receiver is the synchronized modifier, false otherwise.static booleanisSynchronized(int flags) Returns whether the given flags includes the "synchronized" modifier.booleanAnswer true if the receiver is the transient modifier, false otherwise.static booleanisTransient(int flags) Returns whether the given flags includes the "transient" modifier.booleanAnswer true if the receiver is the volatile modifier, false otherwise.static booleanisVolatile(int flags) Returns whether the given flags includes the "volatile" modifier.static ListpropertyDescriptors(int apiLevel) Returns a list of structural property descriptors for this node type.voidsetKeyword(Modifier.ModifierKeyword modifierKeyord) Sets the modifier keyword of this modifier node.Methods inherited from class ASTNode
accept, copySubtree, copySubtrees, delete, equals, getAST, getFlags, getLength, getLocationInParent, getNodeType, getParent, getProperty, getRoot, getStartPosition, getStructuralProperty, hashCode, nodeClassForType, properties, setFlags, setProperty, setSourceRange, setStructuralProperty, structuralPropertiesForType, subtreeBytes, subtreeMatch, toStringModifier and TypeMethodDescriptionfinal voidaccept(ASTVisitor visitor) Accepts the given visitor on a visit of the current node.static ASTNodecopySubtree(AST target, ASTNode node) Returns a deep copy of the subtree of AST nodes rooted at the given node.static ListcopySubtrees(AST target, List nodes) Returns a deep copy of the subtrees of AST nodes rooted at the given list of nodes.final voiddelete()Removes this node from its parent.final booleanTheASTNodeimplementation of thisObjectmethod uses object identity (==).final ASTgetAST()Returns this node's AST.final intgetFlags()Returns the flags associated with this node.final intReturns the length in characters of the original source file indicating where the source fragment corresponding to this node ends.Returns the location of this node within its parent, ornullif this is a root node.final intReturns an integer value identifying the type of this concrete AST node.final ASTNodeReturns this node's parent node, ornullif this is the root node.final ObjectgetProperty(String propertyName) Returns the value of the named property of this node, ornullif none.final ASTNodegetRoot()Returns the root node at or above this node; returns this node if it is a root.final intReturns the character index into the original source file indicating where the source fragment corresponding to this node begins.final ObjectReturns the value of the given structural property for this node.final inthashCode()static ClassnodeClassForType(int nodeType) Returns the node class for the corresponding node type.final MapReturns an unmodifiable table of the properties of this node with non-nullvalues.final voidsetFlags(int flags) Sets the flags associated with this node to the given value.final voidsetProperty(String propertyName, Object data) Sets the named property of this node to the given value, or tonullto clear it.final voidsetSourceRange(int startPosition, int length) Sets the source range of the original source file where the source fragment corresponding to this node was found.final voidsetStructuralProperty(StructuralPropertyDescriptor property, Object value) Sets the value of the given structural property for this node.final ListReturns a list of structural property descriptors for nodes of the same type as this node.final intReturns an estimate of the memory footprint in bytes of the entire subtree rooted at this node.final booleansubtreeMatch(ASTMatcher matcher, Object other) Returns whether the subtree rooted at the given node matches the given other object as decided by the given matcher.final StringtoString()Returns a string representation of this node suitable for debugging purposes only.
-
Field Details
-
ABSTRACT
public static final int ABSTRACT"abstract" modifier constant (bit mask). Applicable to types and methods.- Since:
- 2.0
- See Also:
-
FINAL
public static final int FINAL"final" modifier constant (bit mask). Applicable to types, methods, fields, and variables.- Since:
- 2.0
- See Also:
-
KEYWORD_PROPERTY
The "keyword" structural property of this node type (type:Modifier.ModifierKeyword).- Since:
- 3.0
-
NATIVE
public static final int NATIVE"native" modifier constant (bit mask). Applicable only to methods.- Since:
- 2.0
- See Also:
-
NONE
public static final int NONEModifier constant (bit mask, value 0) indicating no modifiers.- Since:
- 2.0
- See Also:
-
PRIVATE
public static final int PRIVATE"private" modifier constant (bit mask). Applicable to types, methods, constructors, and fields.- Since:
- 2.0
- See Also:
-
PROTECTED
public static final int PROTECTED"protected" modifier constant (bit mask). Applicable to types, methods, constructors, and fields.- Since:
- 2.0
- See Also:
-
PUBLIC
public static final int PUBLIC"public" modifier constant (bit mask). Applicable to types, methods, constructors, and fields.- Since:
- 2.0
- See Also:
-
STATIC
public static final int STATIC"static" modifier constant (bit mask). Applicable to types, methods, fields, and initializers.- Since:
- 2.0
- See Also:
-
STRICTFP
public static final int STRICTFP"strictfp" modifier constant (bit mask). Applicable to types and methods.- Since:
- 2.0
- See Also:
-
SYNCHRONIZED
public static final int SYNCHRONIZED"synchronized" modifier constant (bit mask). Applicable only to methods.- Since:
- 2.0
- See Also:
-
TRANSIENT
public static final int TRANSIENT"transient" modifier constant (bit mask). Applicable only to fields.- Since:
- 2.0
- See Also:
-
VOLATILE
public static final int VOLATILE"volatile" modifier constant (bit mask). Applicable only to fields.- Since:
- 2.0
- See Also:
-
SEALED
public static final int SEALED"sealed" modifier constant (bit mask). Applicable only to types.- Since:
- 3.24
- See Also:
-
NON_SEALED
public static final int NON_SEALED"non-sealed" modifier constant (bit mask). Applicable only to types.- Since:
- 3.24
- See Also:
-
MODULE
public static final int MODULE"module" modifier constant (bit mask). Applicable only to imports.- Since:
- 3.40
- See Also:
-
DEFAULT
public static final int DEFAULT"default" modifier constant (bit mask) (added in JLS8 API). Applicable only to methods in interfaces (but not for annotation methods with a default value).Note that the value of this flag is internal and is not specified in the Java Virtual Machine Specification.
- Since:
- 3.10
- See Also:
-
-
Method Details
-
isAbstract
public static boolean isAbstract(int flags) Returns whether the given flags includes the "abstract" modifier. Applicable to types and methods.- Parameters:
flags- the modifier flags- Returns:
trueif theABSTRACTbit is set, andfalseotherwise- Since:
- 2.0
-
isFinal
public static boolean isFinal(int flags) Returns whether the given flags includes the "final" modifier. Applicable to types, methods, fields, and variables.- Parameters:
flags- the modifier flags- Returns:
trueif theFINALbit is set, andfalseotherwise- Since:
- 2.0
-
isNative
public static boolean isNative(int flags) Returns whether the given flags includes the "native" modifier. Applicable only to methods.- Parameters:
flags- the modifier flags- Returns:
trueif theNATIVEbit is set, andfalseotherwise- Since:
- 2.0
-
isPrivate
public static boolean isPrivate(int flags) Returns whether the given flags includes the "private" modifier. Applicable to types, methods, constructors, and fields.- Parameters:
flags- the modifier flags- Returns:
trueif thePRIVATEbit is set, andfalseotherwise- Since:
- 2.0
-
isProtected
public static boolean isProtected(int flags) Returns whether the given flags includes the "protected" modifier. Applicable to types, methods, constructors, and fields.- Parameters:
flags- the modifier flags- Returns:
trueif thePROTECTEDbit is set, andfalseotherwise- Since:
- 2.0
-
isPublic
public static boolean isPublic(int flags) Returns whether the given flags includes the "public" modifier. Applicable to types, methods, constructors, and fields.- Parameters:
flags- the modifier flags- Returns:
trueif thePUBLICbit is set, andfalseotherwise- Since:
- 2.0
-
isStatic
public static boolean isStatic(int flags) Returns whether the given flags includes the "static" modifier. Applicable to types, methods, fields, and initializers.- Parameters:
flags- the modifier flags- Returns:
trueif theSTATICbit is set, andfalseotherwise- Since:
- 2.0
-
isStrictfp
public static boolean isStrictfp(int flags) Returns whether the given flags includes the "strictfp" modifier. Applicable to types and methods.- Parameters:
flags- the modifier flags- Returns:
trueif theSTRICTFPbit is set, andfalseotherwise- Since:
- 2.0
-
isSynchronized
public static boolean isSynchronized(int flags) Returns whether the given flags includes the "synchronized" modifier. Applicable only to methods.- Parameters:
flags- the modifier flags- Returns:
trueif theSYNCHRONIZEDbit is set, andfalseotherwise- Since:
- 2.0
-
isTransient
public static boolean isTransient(int flags) Returns whether the given flags includes the "transient" modifier. Applicable only to fields.- Parameters:
flags- the modifier flags- Returns:
trueif theTRANSIENTbit is set, andfalseotherwise- Since:
- 2.0
-
isVolatile
public static boolean isVolatile(int flags) Returns whether the given flags includes the "volatile" modifier. Applicable only to fields.- Parameters:
flags- the modifier flags- Returns:
trueif theVOLATILEbit is set, andfalseotherwise- Since:
- 2.0
-
isDefault
public static boolean isDefault(int flags) Returns whether the given flags includes the "default" modifier. Applicable only to methods in interfaces.- Parameters:
flags- the modifier flags- Returns:
trueif theDEFAULTbit is set andfalseotherwise- Since:
- 3.10
-
isSealed
public static boolean isSealed(int flags) Returns whether the given flags includes the "sealed" modifier. Applicable only to types.- Parameters:
flags- the modifier flags- Returns:
trueif theSEALEDbit is set andfalseotherwise- Since:
- 3.24
-
isNonSealed
public static boolean isNonSealed(int flags) Returns whether the given flags includes the "non-sealed" modifier. Applicable only to types.- Parameters:
flags- the modifier flags- Returns:
trueif theNON_SEALEDbit is set andfalseotherwise- Since:
- 3.24
-
propertyDescriptors
Returns a list of structural property descriptors for this node type. Clients must not modify the result.- Parameters:
apiLevel- the API level; one of theAST.JLS*constants- Returns:
- a list of property descriptors (element type:
StructuralPropertyDescriptor) - Since:
- 3.0
-
getKeyword
Returns the modifier keyword of this modifier node.- Returns:
- the modifier keyword
- Since:
- 3.0
-
isAbstract
public boolean isAbstract()Answer true if the receiver is the abstract modifier, false otherwise.- Returns:
- true if the receiver is the abstract modifier, false otherwise
- Since:
- 3.2
-
isAnnotation
public boolean isAnnotation()Description copied from interface:IExtendedModifierReturns whether this extended modifier is an annotation.- Specified by:
isAnnotationin interfaceIExtendedModifier- Returns:
trueif this is an annotation (instance of a subclass ofAnnotation), andfalseotherwise- See Also:
-
isFinal
public boolean isFinal()Answer true if the receiver is the final modifier, false otherwise.- Returns:
- true if the receiver is the final modifier, false otherwise
- Since:
- 3.2
-
isModifier
public boolean isModifier()Description copied from interface:IExtendedModifierReturns whether this extended modifier is a standard modifier.- Specified by:
isModifierin interfaceIExtendedModifier- Returns:
trueif this is a standard modifier (instance ofModifier), andfalseotherwise- See Also:
-
isNative
public boolean isNative()Answer true if the receiver is the native modifier, false otherwise.- Returns:
- true if the receiver is the native modifier, false otherwise
- Since:
- 3.2
-
isPrivate
public boolean isPrivate()Answer true if the receiver is the private modifier, false otherwise.- Returns:
- true if the receiver is the private modifier, false otherwise
- Since:
- 3.2
-
isProtected
public boolean isProtected()Answer true if the receiver is the protected modifier, false otherwise.- Returns:
- true if the receiver is the protected modifier, false otherwise
- Since:
- 3.2
-
isPublic
public boolean isPublic()Answer true if the receiver is the public modifier, false otherwise.- Returns:
- true if the receiver is the public modifier, false otherwise
- Since:
- 3.2
-
isStatic
public boolean isStatic()Answer true if the receiver is the static modifier, false otherwise.- Returns:
- true if the receiver is the static modifier, false otherwise
- Since:
- 3.2
-
isStrictfp
public boolean isStrictfp()Answer true if the receiver is the strictfp modifier, false otherwise.- Returns:
- true if the receiver is the strictfp modifier, false otherwise
- Since:
- 3.2
-
isSynchronized
public boolean isSynchronized()Answer true if the receiver is the synchronized modifier, false otherwise.- Returns:
- true if the receiver is the synchronized modifier, false otherwise
- Since:
- 3.2
-
isTransient
public boolean isTransient()Answer true if the receiver is the transient modifier, false otherwise.- Returns:
- true if the receiver is the transient modifier, false otherwise
- Since:
- 3.2
-
isVolatile
public boolean isVolatile()Answer true if the receiver is the volatile modifier, false otherwise.- Returns:
- true if the receiver is the volatile modifier, false otherwise
- Since:
- 3.2
-
isDefault
public boolean isDefault()Answer true if the receiver is the default modifier, false otherwise.- Returns:
- true if the receiver is the default modifier, false otherwise
- Since:
- 3.10
-
isSealed
public boolean isSealed()Answer true if the receiver is the sealed modifier, false otherwise.- Returns:
- true if the receiver is the sealed modifier, false otherwise
- Since:
- 3.24
-
isNonSealed
public boolean isNonSealed()Answer true if the receiver is the non-sealed modifier, false otherwise.- Returns:
- true if the receiver is the non-sealed modifier, false otherwise
- Since:
- 3.24
-
isModule
public static boolean isModule(int flags) Answer true if the receiver is the module modifier, false otherwise.- Returns:
- true if the receiver is the module modifier, false otherwise
- Since:
- 3.39
-
setKeyword
Sets the modifier keyword of this modifier node.- Parameters:
modifierKeyord- the modifier keyword- Throws:
IllegalArgumentException- if the argument isnull- Since:
- 3.0
-