This commit is contained in:
Roman Shevchenko
2012-06-05 21:52:05 +04:00
parent 89d52d3a9e
commit b3de9ce33f
3 changed files with 22 additions and 19 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@ import com.intellij.psi.tree.IElementType;
* Represents a Java binary expression (addition, multiplication and so on).
* N.B Please use {@link PsiPolyadicExpression} instead as a more general form of an infix operator-expression.
*/
public interface PsiBinaryExpression extends PsiExpression, PsiPolyadicExpression {
public interface PsiBinaryExpression extends PsiPolyadicExpression {
/**
* Returns the left operand of the expression.
*
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,7 +30,8 @@ public interface PsiVariable extends PsiModifierListOwner, PsiNameIdentifierOwne
*
* @return the variable type.
*/
@NotNull PsiType getType();
@NotNull
PsiType getType();
/**
* Returns the type element declaring the type of the variable.
@@ -46,15 +47,15 @@ public interface PsiVariable extends PsiModifierListOwner, PsiNameIdentifierOwne
* @return the initializer expression, or null if it has no initializer.
* @see {@link #hasInitializer()}
*/
@Nullable PsiExpression getInitializer();
@Nullable
PsiExpression getInitializer();
/**
* Checks if the variable has an initializer.
* <p>Checks if the variable has an initializer.</p>
* <p>Please note that even when {@link #hasInitializer()} returns true, {@link #getInitializer()} still can return null,
* e.g. for implicit initializer in case of enum constant declaration.</p>
*
* @return true if the variable has an initializer, false otherwise
*
* Please note that even when {@link #hasInitializer()} returns true, {@link #getInitializer()} still can return null,
* e.g. for implicit initializer in case of enum constant declaration
* @return true if the variable has an initializer, false otherwise.
*/
boolean hasInitializer();
@@ -63,7 +64,7 @@ public interface PsiVariable extends PsiModifierListOwner, PsiNameIdentifierOwne
* other declarations. Also, if the variable is an array, ensures that the array
* brackets are used in Java style (<code>int[] a</code>)
* and not in C style (<code> int a[]</code>).
*
*
* @throws IncorrectOperationException if the modification fails for some reason.
*/
void normalizeDeclaration() throws IncorrectOperationException; // Q: split into normalizeBrackets and splitting declarations?
@@ -72,9 +73,10 @@ public interface PsiVariable extends PsiModifierListOwner, PsiNameIdentifierOwne
* Calculates and returns the constant value of the variable initializer.
*
* @return the calculated value, or null if the variable has no initializer or
* the initializer does not evaluate to a constant.
* the initializer does not evaluate to a constant.
*/
@Nullable Object computeConstantValue();
@Nullable
Object computeConstantValue();
/**
* Returns the identifier declaring the name of the variable.
@@ -82,7 +84,8 @@ public interface PsiVariable extends PsiModifierListOwner, PsiNameIdentifierOwne
* @return the variable name identifier.
*/
@Override
@Nullable PsiIdentifier getNameIdentifier();
@Nullable
PsiIdentifier getNameIdentifier();
@Override
PsiElement setName(@NonNls @NotNull String name) throws IncorrectOperationException;