public interface PsiNewExpression extends PsiCallExpression, PsiConstructorCall
Iconable.IconFlags, Iconable.LastComputedIcon
ARRAY_FACTORY, EMPTY_ARRAY, EXPRESSION_TO_TYPE
ICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY
Modifier and Type | Method and Description |
---|---|
PsiAnonymousClass |
getAnonymousClass()
Returns the anonymous class created by the
new expression. |
PsiExpression [] |
getArrayDimensions()
Returns the expressions specifying the dimensions of the created array in
an array creation expression.
|
PsiArrayInitializerExpression |
getArrayInitializer()
Returns the expression specifying the initializer for the created array in
an array creation expression.
|
PsiJavaCodeReferenceElement |
getClassOrAnonymousClassReference()
Returns the reference element specifying the class the instance of which is created,
or, if it's an anonymous class creation, corresponding base class reference.
|
PsiJavaCodeReferenceElement |
getClassReference()
Returns the reference element specifying the class the instance of which is created.
|
PsiType |
getOwner(PsiAnnotation annotation)
For type-annotated array creation expressions returns subtype of getType(),
to which an annotation belongs.
|
PsiExpression |
getQualifier()
Returns the qualifier (expression specifying instance of outer class) for a
qualified class instance creation expression.
|
default boolean |
isArrayCreation() |
getTypeArgumentList, getTypeArguments
getType
accept, 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, processDeclarations, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArray, toString
getUserData, putUserData
resolveConstructor
getArgumentList, resolveMethod, resolveMethodGenerics
PsiExpression getQualifier()
PsiExpression [] getArrayDimensions()
new
expression is not an array creation expression.PsiArrayInitializerExpression getArrayInitializer()
new
expression is not an array creation expression or has no initializer.PsiJavaCodeReferenceElement getClassReference()
PsiAnonymousClass getAnonymousClass()
new
expression.PsiJavaCodeReferenceElement getClassOrAnonymousClassReference()
PsiType getOwner(PsiAnnotation annotation)
annotation
- annotation to find the type for.default boolean isArrayCreation()
new T[0]
or new T[] {...}