Class CatchClause
- java.lang.Object
-
- com.strobel.core.Freezable
-
- com.strobel.decompiler.languages.java.ast.AstNode
-
- com.strobel.decompiler.languages.java.ast.CatchClause
-
- All Implemented Interfaces:
UserDataStore
,IFreezable
,INode
,java.lang.Cloneable
- Direct Known Subclasses:
CatchClause.NullCatchClause
,CatchClause.PatternPlaceholder
public class CatchClause extends AstNode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
CatchClause.NullCatchClause
private static class
CatchClause.PatternPlaceholder
-
Field Summary
Fields Modifier and Type Field Description static TokenRole
CATCH_KEYWORD_ROLE
static CatchClause
NULL
-
Fields inherited from class com.strobel.decompiler.languages.java.ast.AstNode
AST_NODE_USED_FLAGS, flags, FROZEN_BIT, ROLE_INDEX_MASK, ROOT_ROLE
-
Fields inherited from interface com.strobel.decompiler.patterns.INode
CHILD_ITERATOR
-
-
Constructor Summary
Constructors Constructor Description CatchClause()
CatchClause(BlockStatement body)
-
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)
void
addVariableModifier(Flags.Flag modifier)
static CatchClause
forPattern(Pattern pattern)
BlockStatement
getBody()
JavaTokenNode
getCatchToken()
AstNodeCollection<AstType>
getExceptionTypes()
JavaTokenNode
getLeftParenthesisToken()
NodeType
getNodeType()
JavaTokenNode
getRightParenthesisToken()
Role<? extends CatchClause>
getRole()
AstNodeCollection<JavaModifierToken>
getVariableModifiers()
java.lang.String
getVariableName()
Identifier
getVariableNameToken()
boolean
matches(INode other, Match match)
void
removeVariableModifier(Flags.Flag modifier)
void
setBody(BlockStatement value)
void
setVariableModifiers(java.util.Collection<Flags.Flag> modifiers)
void
setVariableName(java.lang.String value)
void
setVariableNameToken(Identifier value)
-
Methods inherited from class com.strobel.decompiler.languages.java.ast.AstNode
addChild, addChildUnsafe, clone, 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
-
NULL
public static final CatchClause NULL
-
CATCH_KEYWORD_ROLE
public static final TokenRole CATCH_KEYWORD_ROLE
-
-
Constructor Detail
-
CatchClause
public CatchClause()
-
CatchClause
public CatchClause(BlockStatement body)
-
-
Method Detail
-
getCatchToken
public final JavaTokenNode getCatchToken()
-
getLeftParenthesisToken
public final JavaTokenNode getLeftParenthesisToken()
-
getRightParenthesisToken
public final JavaTokenNode getRightParenthesisToken()
-
getExceptionTypes
public final AstNodeCollection<AstType> getExceptionTypes()
-
getVariableName
public final java.lang.String getVariableName()
-
setVariableName
public final void setVariableName(java.lang.String value)
-
getVariableNameToken
public final Identifier getVariableNameToken()
-
setVariableNameToken
public final void setVariableNameToken(Identifier value)
-
getVariableModifiers
public final AstNodeCollection<JavaModifierToken> getVariableModifiers()
-
addVariableModifier
public final void addVariableModifier(Flags.Flag modifier)
-
setVariableModifiers
public final void setVariableModifiers(java.util.Collection<Flags.Flag> modifiers)
-
removeVariableModifier
public final void removeVariableModifier(Flags.Flag modifier)
-
getBody
public final BlockStatement getBody()
-
setBody
public final void setBody(BlockStatement value)
-
acceptVisitor
public <T,R> R acceptVisitor(IAstVisitor<? super T,? extends R> visitor, T data)
- Specified by:
acceptVisitor
in classAstNode
-
getRole
public Role<? extends CatchClause> getRole()
-
getNodeType
public NodeType getNodeType()
- Specified by:
getNodeType
in classAstNode
-
forPattern
public static CatchClause forPattern(Pattern pattern)
-
-