public class PsiTryStatementImpl extends CompositePsiElement implements PsiTryStatement, Constants
Iconable.IconFlags, Iconable.LastComputedIcon
JavaElementType.ICodeBlockElementType, JavaElementType.JavaCompositeElementType, JavaElementType.JavaDummyElementType, JavaElementType.TypeTextElementType
JavaDocElementType.JavaDocCompositeElementType, JavaDocElementType.JavaDocLazyElementType
ourHC
EMPTY_ARRAY
FLAGS_LOCKED, ICON_PLACEHOLDER
ARRAY_FACTORY, EMPTY_ARRAY
ICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY
ANNOTATION_BIT_SET, CATCH_SECTION_BIT_SET, CLASS_BIT_SET, CLASS_INITIALIZER_BIT_SET, FIELD_BIT_SET, JAVA_CODE_REFERENCE_BIT_SET, METHOD_BIT_SET, NAME_VALUE_PAIR_BIT_SET, PARAMETER_BIT_SET
ANNOTATION_MEMBER_VALUE_BIT_SET, ARRAY_DIMENSION_BIT_SET, CLASS_KEYWORD_BIT_SET, EXPRESSION_BIT_SET, FULL_MEMBER_BIT_SET, IMPORT_STATEMENT_BASE_BIT_SET, INTEGER_LITERALS, JAVA_COMMENT_BIT_SET, JAVA_COMMENT_OR_WHITESPACE_BIT_SET, JAVA_MODULE_STATEMENT_BIT_SET, JAVA_PLAIN_COMMENT_BIT_SET, JAVA_STATEMENT_BIT_SET, KEYWORD_BIT_SET, LITERAL_BIT_SET, MEMBER_BIT_SET, MODIFIER_BIT_SET, OPERATION_BIT_SET, PRIMITIVE_TYPE_BIT_SET, REAL_LITERALS, STRING_LITERALS, TEXT_LITERALS
ABSTRACT_KEYWORD, AND, ANDAND, ANDEQ, ARROW, ASSERT_KEYWORD, ASTERISK, ASTERISKEQ, AT, BOOLEAN_KEYWORD, BREAK_KEYWORD, BYTE_KEYWORD, C_STYLE_COMMENT, CASE_KEYWORD, CATCH_KEYWORD, CHAR_KEYWORD, CHARACTER_LITERAL, CLASS_KEYWORD, COLON, COMMA, CONST_KEYWORD, CONTINUE_KEYWORD, DEFAULT_KEYWORD, DIV, DIVEQ, DO_KEYWORD, DOT, DOUBLE_COLON, DOUBLE_KEYWORD, DOUBLE_LITERAL, ELLIPSIS, ELSE_KEYWORD, END_OF_LINE_COMMENT, ENUM_KEYWORD, EQ, EQEQ, EXCL, EXPORTS_KEYWORD, EXTENDS_KEYWORD, FALSE_KEYWORD, FINAL_KEYWORD, FINALLY_KEYWORD, FLOAT_KEYWORD, FLOAT_LITERAL, FOR_KEYWORD, GE, GOTO_KEYWORD, GT, GTGT, GTGTEQ, GTGTGT, GTGTGTEQ, IDENTIFIER, IF_KEYWORD, IMPLEMENTS_KEYWORD, IMPORT_KEYWORD, INSTANCEOF_KEYWORD, INT_KEYWORD, INTEGER_LITERAL, INTERFACE_KEYWORD, LBRACE, LBRACKET, LE, LONG_KEYWORD, LONG_LITERAL, LPARENTH, LT, LTLT, LTLTEQ, MINUS, MINUSEQ, MINUSMINUS, MODULE_KEYWORD, NATIVE_KEYWORD, NE, NEW_KEYWORD, NULL_KEYWORD, OPEN_KEYWORD, OPENS_KEYWORD, OR, OREQ, OROR, PACKAGE_KEYWORD, PERC, PERCEQ, PLUS, PLUSEQ, PLUSPLUS, PRIVATE_KEYWORD, PROTECTED_KEYWORD, PROVIDES_KEYWORD, PUBLIC_KEYWORD, QUEST, RBRACE, RBRACKET, RECORD_KEYWORD, REQUIRES_KEYWORD, RETURN_KEYWORD, RPARENTH, SEMICOLON, SHORT_KEYWORD, STATIC_KEYWORD, STRICTFP_KEYWORD, STRING_LITERAL, SUPER_KEYWORD, SWITCH_KEYWORD, SYNCHRONIZED_KEYWORD, TEXT_BLOCK_LITERAL, THIS_KEYWORD, THROW_KEYWORD, THROWS_KEYWORD, TILDE, TO_KEYWORD, TRANSIENT_KEYWORD, TRANSITIVE_KEYWORD, TRUE_KEYWORD, TRY_KEYWORD, USES_KEYWORD, VAR_KEYWORD, VOID_KEYWORD, VOLATILE_KEYWORD, WHILE_KEYWORD, WITH_KEYWORD, XOR, XOREQ, YIELD_KEYWORD
BAD_CHARACTER, CODE_FRAGMENT, DUMMY_HOLDER, ERROR_ELEMENT, NEW_LINE_INDENT, WHITE_SPACE
ALL_JAVADOC_TOKENS, DOC_COMMENT_BAD_CHARACTER, DOC_COMMENT_DATA, DOC_COMMENT_END, DOC_COMMENT_LEADING_ASTERISKS, DOC_COMMENT_START, DOC_INLINE_TAG_END, DOC_INLINE_TAG_START, DOC_SPACE, DOC_TAG_NAME, DOC_TAG_VALUE_COMMA, DOC_TAG_VALUE_DOT, DOC_TAG_VALUE_GT, DOC_TAG_VALUE_LPAREN, DOC_TAG_VALUE_LT, DOC_TAG_VALUE_RPAREN, DOC_TAG_VALUE_SHARP_TOKEN, DOC_TAG_VALUE_TOKEN
ANNOTATION, ANNOTATION_ARRAY_INITIALIZER, ANNOTATION_METHOD, ANNOTATION_PARAMETER_LIST, ANONYMOUS_CLASS, ARRAY_ACCESS_EXPRESSION, ARRAY_INITIALIZER_EXPRESSION, ASSERT_STATEMENT, ASSIGNMENT_EXPRESSION, BINARY_EXPRESSION, BLOCK_STATEMENT, BREAK_STATEMENT, CATCH_SECTION, CLASS, CLASS_INITIALIZER, CLASS_OBJECT_ACCESS_EXPRESSION, CODE_BLOCK, CONDITIONAL_EXPRESSION, CONTINUE_STATEMENT, DECLARATION_STATEMENT, DIAMOND_TYPE, DO_WHILE_STATEMENT, DUMMY_ELEMENT, EMPTY_EXPRESSION, EMPTY_STATEMENT, ENUM_CONSTANT, ENUM_CONSTANT_INITIALIZER, EXPORTS_STATEMENT, EXPRESSION_LIST, EXPRESSION_LIST_STATEMENT, EXPRESSION_STATEMENT, EXPRESSION_TEXT, EXTENDS_BOUND_LIST, EXTENDS_LIST, FIELD, FOR_STATEMENT, FOREACH_STATEMENT, IF_STATEMENT, IMPLEMENTS_LIST, IMPORT_LIST, IMPORT_STATEMENT, IMPORT_STATIC_REFERENCE, IMPORT_STATIC_STATEMENT, INSTANCE_OF_EXPRESSION, JAVA_CODE_REFERENCE, LABELED_STATEMENT, LAMBDA_EXPRESSION, LITERAL_EXPRESSION, LOCAL_VARIABLE, MEMBERS, METHOD, METHOD_CALL_EXPRESSION, METHOD_REF_EXPRESSION, MODIFIER_LIST, MODULE, MODULE_REFERENCE, NAME_VALUE_PAIR, NEW_EXPRESSION, OPENS_STATEMENT, PACKAGE_STATEMENT, PARAMETER, PARAMETER_LIST, PARENTH_EXPRESSION, PATTERN_VARIABLE, POLYADIC_EXPRESSION, POSTFIX_EXPRESSION, PREFIX_EXPRESSION, PROVIDES_STATEMENT, PROVIDES_WITH_LIST, RECEIVER_PARAMETER, RECORD_COMPONENT, RECORD_HEADER, REFERENCE_EXPRESSION, REFERENCE_PARAMETER_LIST, REFERENCE_TEXT, REQUIRES_STATEMENT, RESOURCE_EXPRESSION, RESOURCE_LIST, RESOURCE_VARIABLE, RETURN_STATEMENT, STATEMENTS, SUPER_EXPRESSION, SWITCH_EXPRESSION, SWITCH_LABEL_STATEMENT, SWITCH_LABELED_RULE, SWITCH_STATEMENT, SYNCHRONIZED_STATEMENT, THIS_EXPRESSION, THROW_STATEMENT, THROWS_LIST, TRY_STATEMENT, TYPE, TYPE_CAST_EXPRESSION, TYPE_PARAMETER, TYPE_PARAMETER_LIST, TYPE_TEST_PATTERN, TYPE_WITH_CONJUNCTIONS_TEXT, TYPE_WITH_DISJUNCTIONS_TEXT, USES_STATEMENT, WHILE_STATEMENT, YIELD_STATEMENT
ALL_JAVADOC_ELEMENTS, DOC_COMMENT, DOC_INLINE_TAG, DOC_METHOD_OR_FIELD_REF, DOC_PARAMETER_REF, DOC_REFERENCE_HOLDER, DOC_TAG, DOC_TAG_VALUE_ELEMENT, DOC_TYPE_HOLDER
EMPTY_NAVIGATION_ITEM_ARRAY
Constructor and Description |
---|
PsiTryStatementImpl() |
Modifier and Type | Method and Description |
---|---|
void |
accept(PsiElementVisitor visitor)
Passes the element to the specified visitor.
|
void |
clearCaches() |
void |
deleteChildInternal(ASTNode child) |
ASTNode |
findChildByRole(int role) |
PsiParameter [] |
getCatchBlockParameters()
Returns the array of parameters for
catch sections. |
PsiCodeBlock [] |
getCatchBlocks()
Returns the array of code blocks executed in the
catch sections
of the statement. |
PsiCatchSection [] |
getCatchSections()
Returns the array of
catch sections in the statement. |
int |
getChildRole(ASTNode child) |
PsiCodeBlock |
getFinallyBlock()
Returns the code block executed in the
finally section. |
PsiResourceList |
getResourceList()
Returns a resource list of try-with-resources statement.
|
PsiCodeBlock |
getTryBlock()
Returns the code block executed by the
try statement. |
boolean |
processDeclarations(PsiScopeProcessor processor,
ResolveState state,
PsiElement lastParent,
PsiElement place)
Passes the declarations contained in this PSI element and its children
for processing to the specified scope processor.
|
java.lang.String |
toString()
toString() should never be presented to the user.
|
acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, canNavigate, canNavigateToSource, checkAdd, checkDelete, clone, copy, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getContainingFile, getContext, getFirstChild, getLanguage, getLastChild, getName, getNavigationElement, getNextSibling, getNode, getOriginalElement, getParent, getPresentation, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getUseScope, isEquivalentTo, isPhysical, isValid, isWritable, navigate, replace
acceptTree, addChild, addChild, addChildren, addInternal, addLeaf, countChildren, createPsiNoLock, findChildByRoleAsPsiElement, findChildByType, findChildByType, findChildByType, findChildByType, findLeafElementAt, findPsiChildByType, findPsiChildByType, getCachedLength, getChars, getChildren, getChildrenAsPsiElements, getChildrenAsPsiElements, getChildRole, getFirstChildNode, getLastChildNode, getPsi, getPsi, getText, getTextLength, hc, rawAddChildren, rawAddChildrenWithoutNotifications, rawFirstChild, rawLastChild, rawRemoveAllChildren, removeAllChildren, removeChild, removeRange, replaceAllChildrenToChildrenOf, replaceChild, replaceChildInternal, setPsi, subtreeChanged, textContains, textMatches, textToCharArray
copyElement, equals, getElementType, getManager, getStartOffset, getStartOffsetInParent, getTextOffset, getTextRange, getTreeNext, getTreeParent, getTreePrev, invalidate, onInvalidated, rawInsertAfterMe, rawInsertBeforeMe, rawRemove, rawRemoveUpTo, rawRemoveUpToLast, rawReplaceWithList, textMatches, textMatches, textMatches
buildRowIcon, computeBaseIcon, createLayeredIcon, getAdjustedBaseIcon, getBaseIcon, getElementIcon, getIcon, iconWithVisibilityIfNeeded, isNativeFileType, isVisibilitySupported, overlayIcons, registerIconLayer, transformFlags
changeUserMap, clearUserData, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, copy, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getContainingFile, getContext, getCopyableUserData, getFirstChild, getLanguage, getLastChild, getManager, getNavigationElement, getNextSibling, getNode, getOriginalElement, getOwnReferences, getParent, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getText, getTextLength, getTextOffset, getTextRange, getTextRangeInParent, getUseScope, isEquivalentTo, isPhysical, isValid, isWritable, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArray
getUserData, putUserData
getCopyableUserData, putCopyableUserData
public void clearCaches()
clearCaches
in class CompositeElement
public PsiCodeBlock getTryBlock()
PsiTryStatement
try
statement.getTryBlock
in interface PsiTryStatement
public PsiCodeBlock [] getCatchBlocks()
PsiTryStatement
catch
sections
of the statement.getCatchBlocks
in interface PsiTryStatement
public PsiParameter [] getCatchBlockParameters()
PsiTryStatement
catch
sections.getCatchBlockParameters
in interface PsiTryStatement
public PsiCatchSection [] getCatchSections()
PsiTryStatement
catch
sections in the statement.getCatchSections
in interface PsiTryStatement
catch
sections, or an empty array if the statement
has no catch sections.public PsiCodeBlock getFinallyBlock()
PsiTryStatement
finally
section.getFinallyBlock
in interface PsiTryStatement
finally
section, or null if the statement
does not have one.public PsiResourceList getResourceList()
PsiTryStatement
getResourceList
in interface PsiTryStatement
public ASTNode findChildByRole(int role)
findChildByRole
in class CompositeElement
public int getChildRole(ASTNode child)
getChildRole
in class CompositeElement
public void accept(PsiElementVisitor visitor)
PsiElement
accept
in interface PsiElement
accept
in class CompositePsiElement
visitor
- the visitor to pass the element to.public boolean processDeclarations(PsiScopeProcessor processor, ResolveState state, PsiElement lastParent, PsiElement place)
PsiElement
processDeclarations
in interface PsiElement
processDeclarations
in class CompositePsiElement
processor
- the processor receiving the declarations.lastParent
- the child of this element has been processed during the previous
step of the tree up walk (declarations under this element do not need
to be processed again)place
- the original element from which the tree up walk was initiated.public void deleteChildInternal(ASTNode child)
deleteChildInternal
in class CompositeElement
public java.lang.String toString()
PsiElement
toString
in interface PsiElement
toString
in class CompositePsiElement