Class MethodDeclaration
- java.lang.Object
-
- com.strobel.core.Freezable
-
- com.strobel.decompiler.languages.java.ast.AstNode
-
- com.strobel.decompiler.languages.java.ast.EntityDeclaration
-
- com.strobel.decompiler.languages.java.ast.MethodDeclaration
-
- All Implemented Interfaces:
UserDataStore
,IFreezable
,INode
,java.lang.Cloneable
- Direct Known Subclasses:
MethodDeclaration.PatternPlaceholder
public class MethodDeclaration extends EntityDeclaration
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
MethodDeclaration.PatternPlaceholder
-
Field Summary
Fields Modifier and Type Field Description static TokenRole
DEFAULT_KEYWORD
static Role<Expression>
DEFAULT_VALUE_ROLE
static TokenRole
THROWS_KEYWORD
-
Fields inherited from class com.strobel.decompiler.languages.java.ast.EntityDeclaration
ANNOTATION_ROLE, MODIFIER_ROLE, PRIVATE_IMPLEMENTATION_TYPE_ROLE, RECORD_COMPONENT, 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 MethodDeclaration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T,R>
RacceptVisitor(IAstVisitor<? super T,? extends R> visitor, T data)
static MethodDeclaration
forPattern(Pattern pattern)
BlockStatement
getBody()
AstNodeCollection<TypeDeclaration>
getDeclaredTypes()
Expression
getDefaultValue()
EntityType
getEntityType()
JavaTokenNode
getLeftParenthesisToken()
AstNodeCollection<ParameterDeclaration>
getParameters()
AstType
getPrivateImplementationType()
JavaTokenNode
getRightParenthesisToken()
AstNodeCollection<AstType>
getThrownTypes()
AstNodeCollection<TypeParameterDeclaration>
getTypeParameters()
boolean
matches(INode other, Match match)
void
setBody(BlockStatement value)
void
setDefaultValue(Expression value)
void
setPrivateImplementationType(AstType type)
-
Methods inherited from class com.strobel.decompiler.languages.java.ast.EntityDeclaration
addModifier, addModifier, clone, getAnnotations, getModifiers, getModifiers, getName, getNameToken, getNodeType, getReturnType, getRole, hasModifier, isAnyModifiers, matchAnnotationsAndModifiers, removeModifier, removeModifier, setAnyModifiers, setModifiers, setModifiers, setName, setNameToken, setReturnType
-
Methods inherited from class com.strobel.decompiler.languages.java.ast.AstNode
addChild, addChildUnsafe, contains, contains, copyUserDataFrom, debugToString, 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, 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
-
DEFAULT_VALUE_ROLE
public static final Role<Expression> DEFAULT_VALUE_ROLE
-
DEFAULT_KEYWORD
public static final TokenRole DEFAULT_KEYWORD
-
THROWS_KEYWORD
public static final TokenRole THROWS_KEYWORD
-
-
Method Detail
-
getPrivateImplementationType
public final AstType getPrivateImplementationType()
-
setPrivateImplementationType
public final void setPrivateImplementationType(AstType type)
-
getDefaultValue
public final Expression getDefaultValue()
-
setDefaultValue
public final void setDefaultValue(Expression value)
-
getThrownTypes
public final AstNodeCollection<AstType> getThrownTypes()
-
getDeclaredTypes
public final AstNodeCollection<TypeDeclaration> getDeclaredTypes()
-
getTypeParameters
public final AstNodeCollection<TypeParameterDeclaration> getTypeParameters()
-
getParameters
public final AstNodeCollection<ParameterDeclaration> getParameters()
-
getBody
public final BlockStatement getBody()
-
setBody
public final void setBody(BlockStatement value)
-
getLeftParenthesisToken
public final JavaTokenNode getLeftParenthesisToken()
-
getRightParenthesisToken
public final JavaTokenNode getRightParenthesisToken()
-
getEntityType
public EntityType getEntityType()
- Specified by:
getEntityType
in classEntityDeclaration
-
acceptVisitor
public <T,R> R acceptVisitor(IAstVisitor<? super T,? extends R> visitor, T data)
- Specified by:
acceptVisitor
in classAstNode
-
forPattern
public static MethodDeclaration forPattern(Pattern pattern)
-
-