From 2e4e0c4fb2d0d3c06b2732d8341cd4895fa50f4a Mon Sep 17 00:00:00 2001 From: Daniil Ovchinnikov Date: Fri, 1 Apr 2016 17:14:54 +0300 Subject: [PATCH] [groovy] initialize array factory with lambda & remove unnecessary interfaces --- .../statements/typedef/GrTypeDefinition.java | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/api/statements/typedef/GrTypeDefinition.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/api/statements/typedef/GrTypeDefinition.java index c5fefb42cb58..0feba15fb04c 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/api/statements/typedef/GrTypeDefinition.java +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/api/statements/typedef/GrTypeDefinition.java @@ -16,7 +16,6 @@ package org.jetbrains.plugins.groovy.lang.psi.api.statements.typedef; -import com.intellij.psi.NavigatablePsiElement; import com.intellij.psi.PsiClass; import com.intellij.psi.PsiField; import com.intellij.psi.PsiMethod; @@ -31,24 +30,12 @@ import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrTopLevelDefinition import org.jetbrains.plugins.groovy.lang.psi.api.statements.typedef.members.GrMember; import org.jetbrains.plugins.groovy.lang.psi.api.statements.typedef.members.GrMembersDeclaration; import org.jetbrains.plugins.groovy.lang.psi.api.statements.typedef.members.GrMethod; -import org.jetbrains.plugins.groovy.lang.psi.api.toplevel.GrTopStatement; import org.jetbrains.plugins.groovy.lang.psi.api.types.GrTypeParameterList; -/** - * @autor: Dmitry.Krasilschikov - * @date: 18.03.2007 - */ -public interface GrTypeDefinition - extends GrTopStatement, NavigatablePsiElement, PsiClass, GrTopLevelDefinition, GrDocCommentOwner, GrMember { +public interface GrTypeDefinition extends PsiClass, GrTopLevelDefinition, GrDocCommentOwner, GrMember { GrTypeDefinition[] EMPTY_ARRAY = new GrTypeDefinition[0]; - ArrayFactory ARRAY_FACTORY = new ArrayFactory() { - @NotNull - @Override - public GrTypeDefinition[] create(int count) { - return new GrTypeDefinition[count]; - } - }; + ArrayFactory ARRAY_FACTORY = GrTypeDefinition[]::new; boolean isTrait();