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_anyModifiersstatic Role<Annotation>ANNOTATION_ROLEstatic Role<JavaModifierToken>MODIFIER_ROLEstatic Role<AstType>PRIVATE_IMPLEMENTATION_TYPE_ROLEstatic Role<ParameterDeclaration>RECORD_COMPONENTstatic 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 voidaddModifier(Flags.Flag modifier)(package private) static voidaddModifier(AstNode node, Flags.Flag modifier)EntityDeclarationclone()AstNodeCollection<Annotation>getAnnotations()abstract EntityTypegetEntityType()AstNodeCollection<JavaModifierToken>getModifiers()(package private) static java.util.List<Flags.Flag>getModifiers(AstNode node)java.lang.StringgetName()IdentifiergetNameToken()NodeTypegetNodeType()AstTypegetReturnType()Role<? extends EntityDeclaration>getRole()booleanhasModifier(Flags.Flag modifier)booleanisAnyModifiers()Gets the "any" modifiers flag used during pattern matching.protected booleanmatchAnnotationsAndModifiers(EntityDeclaration other, Match match)voidremoveModifier(Flags.Flag modifier)(package private) static booleanremoveModifier(AstNode node, Flags.Flag modifier)voidsetAnyModifiers(boolean value)Sets the "any" modifiers flag used during pattern matching.(package private) static voidsetModifiers(AstNode node, java.util.Collection<Flags.Flag> modifiers)voidsetModifiers(java.util.List<Flags.Flag> modifiers)voidsetName(java.lang.String value)voidsetNameToken(Identifier value)voidsetReturnType(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:
getNodeTypein 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)
-
-