Class EntityDeclaration
- java.lang.Object
-
- com.strobel.core.Freezable
-
- com.strobel.decompiler.languages.java.ast.AstNode
-
- com.strobel.decompiler.languages.java.ast.EntityDeclaration
-
- All Implemented Interfaces:
UserDataStore
,IFreezable
,INode
,java.lang.Cloneable
- Direct Known Subclasses:
ConstructorDeclaration
,EnumValueDeclaration
,FieldDeclaration
,InstanceInitializer
,MethodDeclaration
,ModuleDeclaration
,ParameterDeclaration
,TypeDeclaration
public abstract class EntityDeclaration extends AstNode
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
_anyModifiers
static Role<Annotation>
ANNOTATION_ROLE
static Role<JavaModifierToken>
MODIFIER_ROLE
static Role<AstType>
PRIVATE_IMPLEMENTATION_TYPE_ROLE
static Role<ParameterDeclaration>
RECORD_COMPONENT
static Role<Annotation>
UNATTACHED_ANNOTATION_ROLE
-
Fields inherited from class com.strobel.decompiler.languages.java.ast.AstNode
AST_NODE_USED_FLAGS, flags, FROZEN_BIT, NULL, ROLE_INDEX_MASK, ROOT_ROLE
-
Fields inherited from interface com.strobel.decompiler.patterns.INode
CHILD_ITERATOR
-
-
Constructor Summary
Constructors Constructor Description EntityDeclaration()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addModifier(Flags.Flag modifier)
(package private) static void
addModifier(AstNode node, Flags.Flag modifier)
EntityDeclaration
clone()
AstNodeCollection<Annotation>
getAnnotations()
abstract EntityType
getEntityType()
AstNodeCollection<JavaModifierToken>
getModifiers()
(package private) static java.util.List<Flags.Flag>
getModifiers(AstNode node)
java.lang.String
getName()
Identifier
getNameToken()
NodeType
getNodeType()
AstType
getReturnType()
Role<? extends EntityDeclaration>
getRole()
boolean
hasModifier(Flags.Flag modifier)
boolean
isAnyModifiers()
Gets the "any" modifiers flag used during pattern matching.protected boolean
matchAnnotationsAndModifiers(EntityDeclaration other, Match match)
void
removeModifier(Flags.Flag modifier)
(package private) static boolean
removeModifier(AstNode node, Flags.Flag modifier)
void
setAnyModifiers(boolean value)
Sets the "any" modifiers flag used during pattern matching.(package private) static void
setModifiers(AstNode node, java.util.Collection<Flags.Flag> modifiers)
void
setModifiers(java.util.List<Flags.Flag> modifiers)
void
setName(java.lang.String value)
void
setNameToken(Identifier value)
void
setReturnType(AstType type)
-
Methods inherited from class com.strobel.decompiler.languages.java.ast.AstNode
acceptVisitor, addChild, addChildUnsafe, contains, contains, copyUserDataFrom, debugToString, forPattern, freezeCore, getAncestors, getAncestors, getAncestorsAndSelf, getChildByRole, getChildren, getChildrenByRole, getDescendants, getDescendantsAndSelf, getEndLocation, getFirstChild, getLastChild, getNextNode, getNextSibling, getNextSibling, getParent, getParent, getPreviousNode, getPreviousSibling, getPreviousSibling, getRegion, getStartLocation, getText, getText, getUserData, hasChildren, insertChildAfter, insertChildBefore, insertChildBeforeUnsafe, insertChildrenAfter, insertChildrenBefore, isAncestorOf, isAncestorOf, isDescendantOf, isInside, isInside, isLoop, isNull, isReference, isUnconditionalBranch, makeOptional, match, matches, matches, matchesCollection, matchString, putUserData, putUserDataIfAbsent, remove, replace, replaceWith, replaceWith, setChildByRole, setRole, setRoleUnsafe, toString, withName
-
Methods inherited from class com.strobel.core.Freezable
canFreeze, freeze, freezeIfUnfrozen, isFrozen, tryFreeze, verifyFrozen, verifyNotFrozen
-
-
-
-
Field Detail
-
ANNOTATION_ROLE
public static final Role<Annotation> ANNOTATION_ROLE
-
UNATTACHED_ANNOTATION_ROLE
public static final Role<Annotation> UNATTACHED_ANNOTATION_ROLE
-
MODIFIER_ROLE
public static final Role<JavaModifierToken> MODIFIER_ROLE
-
RECORD_COMPONENT
public static final Role<ParameterDeclaration> RECORD_COMPONENT
-
_anyModifiers
private boolean _anyModifiers
-
-
Method Detail
-
isAnyModifiers
public final boolean isAnyModifiers()
Gets the "any" modifiers flag used during pattern matching.
-
setAnyModifiers
public final void setAnyModifiers(boolean value)
Sets the "any" modifiers flag used during pattern matching.
-
getNodeType
public NodeType getNodeType()
- Specified by:
getNodeType
in classAstNode
-
getRole
public Role<? extends EntityDeclaration> getRole()
-
getEntityType
public abstract EntityType getEntityType()
-
getAnnotations
public final AstNodeCollection<Annotation> getAnnotations()
-
hasModifier
public final boolean hasModifier(Flags.Flag modifier)
-
getModifiers
public final AstNodeCollection<JavaModifierToken> getModifiers()
-
getName
public final java.lang.String getName()
-
setName
public final void setName(java.lang.String value)
-
getNameToken
public final Identifier getNameToken()
-
setNameToken
public final void setNameToken(Identifier value)
-
getReturnType
public final AstType getReturnType()
-
setReturnType
public final void setReturnType(AstType type)
-
clone
public EntityDeclaration clone()
-
matchAnnotationsAndModifiers
protected final boolean matchAnnotationsAndModifiers(EntityDeclaration other, Match match)
-
addModifier
public final void addModifier(Flags.Flag modifier)
-
removeModifier
public final void removeModifier(Flags.Flag modifier)
-
setModifiers
public final void setModifiers(java.util.List<Flags.Flag> modifiers)
-
getModifiers
static java.util.List<Flags.Flag> getModifiers(AstNode node)
-
setModifiers
static void setModifiers(AstNode node, java.util.Collection<Flags.Flag> modifiers)
-
addModifier
static void addModifier(AstNode node, Flags.Flag modifier)
-
removeModifier
static boolean removeModifier(AstNode node, Flags.Flag modifier)
-
-