Skip to content

Commit 9d6db10

Browse files
committed
Reformatting PsiModifierList.
1 parent 628b23b commit 9d6db10

4 files changed

Lines changed: 452 additions & 438 deletions

File tree

java-language-api/src/main/java/com/intellij/java/language/psi/PsiModifierList.java

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -27,43 +27,43 @@
2727
* @see PsiModifierListOwner#getModifierList()
2828
*/
2929
public interface PsiModifierList extends PsiElement, PsiAnnotationOwner {
30-
/**
31-
* Checks if the modifier list has the specified modifier set either by an explicit keyword
32-
* or implicitly (for example, interface methods are implicitly public).
33-
*
34-
* @param name the name of the modifier to check.
35-
* @return true if the list has the modifier, false otherwise
36-
* @see #hasExplicitModifier(String)
37-
*/
38-
boolean hasModifierProperty(@PsiModifier.ModifierConstant @Nonnull @NonNls String name);
30+
/**
31+
* Checks if the modifier list has the specified modifier set either by an explicit keyword
32+
* or implicitly (for example, interface methods are implicitly public).
33+
*
34+
* @param name the name of the modifier to check.
35+
* @return true if the list has the modifier, false otherwise
36+
* @see #hasExplicitModifier(String)
37+
*/
38+
boolean hasModifierProperty(@PsiModifier.ModifierConstant @Nonnull @NonNls String name);
3939

40-
/**
41-
* Checks if the modifier list has the specified modifier set by an explicit keyword.
42-
*
43-
* @param name the name of the modifier to check.
44-
* @return true if the list has the modifier, false otherwise
45-
* @see #hasModifierProperty(String)
46-
*/
47-
boolean hasExplicitModifier(@PsiModifier.ModifierConstant @Nonnull @NonNls String name);
40+
/**
41+
* Checks if the modifier list has the specified modifier set by an explicit keyword.
42+
*
43+
* @param name the name of the modifier to check.
44+
* @return true if the list has the modifier, false otherwise
45+
* @see #hasModifierProperty(String)
46+
*/
47+
boolean hasExplicitModifier(@PsiModifier.ModifierConstant @Nonnull @NonNls String name);
4848

49-
/**
50-
* Adds or removes the specified modifier to the modifier list.
51-
*
52-
* @param name the name of the modifier to add or remove.
53-
* @param value true if the modifier should be added, false if it should be removed.
54-
* @throws IncorrectOperationException if the modification fails for some reason.
55-
*/
56-
void setModifierProperty(@PsiModifier.ModifierConstant @Nonnull @NonNls String name, boolean value) throws IncorrectOperationException;
57-
58-
/**
59-
* Checks if it is possible to add or remove the specified modifier to the modifier list,
60-
* and throws an exception if the operation is not possible. Does not actually modify
61-
* anything.
62-
*
63-
* @param name the name of the modifier to check the add or remove possibility for.
64-
* @param value true if the modifier should be added, false if it should be removed.
65-
* @throws IncorrectOperationException if the modification fails for some reason.
66-
*/
67-
void checkSetModifierProperty(@PsiModifier.ModifierConstant @Nonnull @NonNls String name, boolean value) throws IncorrectOperationException;
49+
/**
50+
* Adds or removes the specified modifier to the modifier list.
51+
*
52+
* @param name the name of the modifier to add or remove.
53+
* @param value true if the modifier should be added, false if it should be removed.
54+
* @throws IncorrectOperationException if the modification fails for some reason.
55+
*/
56+
void setModifierProperty(@PsiModifier.ModifierConstant @Nonnull @NonNls String name, boolean value) throws IncorrectOperationException;
6857

58+
/**
59+
* Checks if it is possible to add or remove the specified modifier to the modifier list,
60+
* and throws an exception if the operation is not possible. Does not actually modify
61+
* anything.
62+
*
63+
* @param name the name of the modifier to check the add or remove possibility for.
64+
* @param value true if the modifier should be added, false if it should be removed.
65+
* @throws IncorrectOperationException if the modification fails for some reason.
66+
*/
67+
void checkSetModifierProperty(@PsiModifier.ModifierConstant @Nonnull @NonNls String name, boolean value)
68+
throws IncorrectOperationException;
6969
}

java-language-api/src/main/java/com/intellij/java/language/psi/PsiTypeParameter.java

Lines changed: 42 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -27,57 +27,53 @@
2727
*
2828
* @author dsl
2929
*/
30-
public interface PsiTypeParameter extends PsiClass, PsiAnnotationOwner, JvmTypeParameter
31-
{
32-
/**
33-
* The empty array of PSI type parameters which can be reused to avoid unnecessary allocations.
34-
*/
35-
PsiTypeParameter[] EMPTY_ARRAY = new PsiTypeParameter[0];
30+
public interface PsiTypeParameter extends PsiClass, PsiAnnotationOwner, JvmTypeParameter {
31+
/**
32+
* The empty array of PSI type parameters which can be reused to avoid unnecessary allocations.
33+
*/
34+
PsiTypeParameter[] EMPTY_ARRAY = new PsiTypeParameter[0];
3635

37-
ArrayFactory<PsiTypeParameter> ARRAY_FACTORY = count -> count == 0 ? EMPTY_ARRAY : new PsiTypeParameter[count];
36+
ArrayFactory<PsiTypeParameter> ARRAY_FACTORY = count -> count == 0 ? EMPTY_ARRAY : new PsiTypeParameter[count];
3837

39-
/**
40-
* Returns the extends list of the type parameter.
41-
*
42-
* @return the extends list. For this particular kind of classes it never returns null.
43-
*/
44-
@Override
45-
@Nonnull
46-
PsiReferenceList getExtendsList();
38+
/**
39+
* Returns the extends list of the type parameter.
40+
*
41+
* @return the extends list. For this particular kind of classes it never returns null.
42+
*/
43+
@Override
44+
@Nonnull
45+
PsiReferenceList getExtendsList();
4746

48-
/**
49-
* Returns the element which is parameterized by the type parameter.
50-
*
51-
* @return the type parameter owner instance.
52-
*/
53-
@Nullable
54-
@Override
55-
PsiTypeParameterListOwner getOwner();
47+
/**
48+
* Returns the element which is parameterized by the type parameter.
49+
*
50+
* @return the type parameter owner instance.
51+
*/
52+
@Nullable
53+
@Override
54+
PsiTypeParameterListOwner getOwner();
5655

57-
/**
58-
* Returns the position of this type parameter in the type parameter list of the owner element.
59-
*
60-
* @return the type parameter position.
61-
*/
62-
int getIndex();
56+
/**
57+
* Returns the position of this type parameter in the type parameter list of the owner element.
58+
*
59+
* @return the type parameter position.
60+
*/
61+
int getIndex();
6362

64-
@Nonnull
65-
@Override
66-
default PsiAnnotation[] getAnnotations()
67-
{
68-
return PsiClass.super.getAnnotations();
69-
}
63+
@Nonnull
64+
@Override
65+
default PsiAnnotation[] getAnnotations() {
66+
return PsiClass.super.getAnnotations();
67+
}
7068

71-
@Override
72-
default boolean hasAnnotation(@Nonnull @NonNls String fqn)
73-
{
74-
return PsiClass.super.hasAnnotation(fqn);
75-
}
69+
@Override
70+
default boolean hasAnnotation(@Nonnull @NonNls String fqn) {
71+
return PsiClass.super.hasAnnotation(fqn);
72+
}
7673

77-
@Nonnull
78-
@Override
79-
default JvmReferenceType[] getBounds()
80-
{
81-
return getExtendsList().getReferencedTypes();
82-
}
74+
@Nonnull
75+
@Override
76+
default JvmReferenceType[] getBounds() {
77+
return getExtendsList().getReferencedTypes();
78+
}
8379
}

0 commit comments

Comments
 (0)