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 classCatchClause.NullCatchClauseprivate static classCatchClause.PatternPlaceholder
-
Field Summary
Fields Modifier and Type Field Description static TokenRoleCATCH_KEYWORD_ROLEstatic CatchClauseNULL-
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)voidaddVariableModifier(Flags.Flag modifier)static CatchClauseforPattern(Pattern pattern)BlockStatementgetBody()JavaTokenNodegetCatchToken()AstNodeCollection<AstType>getExceptionTypes()JavaTokenNodegetLeftParenthesisToken()NodeTypegetNodeType()JavaTokenNodegetRightParenthesisToken()Role<? extends CatchClause>getRole()AstNodeCollection<JavaModifierToken>getVariableModifiers()java.lang.StringgetVariableName()IdentifiergetVariableNameToken()booleanmatches(INode other, Match match)voidremoveVariableModifier(Flags.Flag modifier)voidsetBody(BlockStatement value)voidsetVariableModifiers(java.util.Collection<Flags.Flag> modifiers)voidsetVariableName(java.lang.String value)voidsetVariableNameToken(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:
acceptVisitorin classAstNode
-
getRole
public Role<? extends CatchClause> getRole()
-
getNodeType
public NodeType getNodeType()
- Specified by:
getNodeTypein classAstNode
-
forPattern
public static CatchClause forPattern(Pattern pattern)
-
-