public class GenerateMembersUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static PsiMethod |
annotateOnOverrideImplement(PsiClass targetClass,
PsiMethod generated) |
static void |
copyAnnotations(PsiModifierListOwner source,
PsiModifierListOwner target,
java.lang.String... skipAnnotations) |
static void |
copyAnnotations(PsiModifierList source,
PsiModifierList target,
java.lang.String... skipAnnotations) |
static void |
copyOrReplaceModifierList(PsiModifierListOwner sourceParam,
PsiElement targetClass,
PsiModifierListOwner targetParam) |
static void |
copyOrReplaceModifierList(PsiModifierListOwner sourceParam,
PsiModifierListOwner targetParam)
Deprecated.
use
copyOrReplaceModifierList(PsiModifierListOwner, PsiElement, PsiModifierListOwner) . to be deleted in 2017.2 |
static PsiMethod |
generateGetterPrototype(PsiField field) |
static PsiMethod |
generateSetterPrototype(PsiField field) |
static PsiMethod |
generateSetterPrototype(PsiField field,
PsiClass aClass) |
static PsiMethod |
generateSimpleGetterPrototype(PsiField field) |
static PsiMethod |
generateSimpleSetterPrototype(PsiField field) |
static PsiMethod |
generateSimpleSetterPrototype(PsiField field,
PsiClass targetClass) |
static PsiElement |
insert(PsiClass aClass,
PsiMember member,
PsiElement anchor,
boolean before) |
static <T extends GenerationInfo> |
insertMembersAtOffset(PsiClass psiClass,
int offset,
java.util.List<T> memberPrototypes) |
static <T extends GenerationInfo> |
insertMembersAtOffset(PsiFile file,
int offset,
java.util.List<T> memberPrototypes) |
static <T extends GenerationInfo> |
insertMembersBeforeAnchor(PsiClass aClass,
PsiElement anchor,
java.util.List<T> memberPrototypes) |
static boolean |
isChildInRange(PsiElement child,
PsiElement first,
PsiElement last) |
static PsiParameter [] |
overriddenParameters(PsiParameter [] parameters,
JVMElementFactory factory,
JavaCodeStyleManager codeStyleManager,
PsiSubstitutor substitutor,
PsiElement target) |
static void |
positionCaret(Editor editor,
PsiElement firstMember,
boolean toEditMethodBody) |
static void |
setupGeneratedMethod(PsiMethod method)
May add @Override, body according to the override template and align throws list according to the super method
|
static PsiMethod |
setVisibility(PsiMember member,
PsiMethod prototype) |
static PsiMethod |
substituteGenericMethod(PsiMethod method,
PsiSubstitutor substitutor) |
static PsiMethod |
substituteGenericMethod(PsiMethod sourceMethod,
PsiSubstitutor substitutor,
PsiElement target) |
static java.lang.String |
suggestGetterName(PsiField field) |
static java.lang.String |
suggestGetterName(java.lang.String name,
PsiType type,
Project project) |
static java.lang.String |
suggestSetterName(PsiField field) |
static java.lang.String |
suggestSetterName(java.lang.String name,
PsiType type,
Project project) |
public static <T extends GenerationInfo> java.util.List<T> insertMembersAtOffset(PsiFile file, int offset, java.util.List<T> memberPrototypes) throws IncorrectOperationException
IncorrectOperationException
public static <T extends GenerationInfo> java.util.List<T> insertMembersAtOffset(PsiClass psiClass, int offset, java.util.List<T> memberPrototypes) throws IncorrectOperationException
IncorrectOperationException
public static <T extends GenerationInfo> java.util.List<T> insertMembersBeforeAnchor(PsiClass aClass, PsiElement anchor, java.util.List<T> memberPrototypes) throws IncorrectOperationException
IncorrectOperationException
public static void positionCaret(Editor editor, PsiElement firstMember, boolean toEditMethodBody)
public static PsiElement insert(PsiClass aClass, PsiMember member, PsiElement anchor, boolean before) throws IncorrectOperationException
IncorrectOperationException
public static PsiMethod substituteGenericMethod(PsiMethod method, PsiSubstitutor substitutor)
public static PsiMethod substituteGenericMethod(PsiMethod sourceMethod, PsiSubstitutor substitutor, PsiElement target)
public static PsiParameter [] overriddenParameters(PsiParameter [] parameters, JVMElementFactory factory, JavaCodeStyleManager codeStyleManager, PsiSubstitutor substitutor, PsiElement target)
public static boolean isChildInRange(PsiElement child, PsiElement first, PsiElement last)
public static void setupGeneratedMethod(PsiMethod method)
@Deprecated public static void copyOrReplaceModifierList(PsiModifierListOwner sourceParam, PsiModifierListOwner targetParam)
copyOrReplaceModifierList(PsiModifierListOwner, PsiElement, PsiModifierListOwner)
. to be deleted in 2017.2public static void copyOrReplaceModifierList(PsiModifierListOwner sourceParam, PsiElement targetClass, PsiModifierListOwner targetParam)
public static void copyAnnotations(PsiModifierList source, PsiModifierList target, java.lang.String... skipAnnotations)
public static void copyAnnotations(PsiModifierListOwner source, PsiModifierListOwner target, java.lang.String... skipAnnotations)
public static PsiMethod generateSimpleSetterPrototype(PsiField field, PsiClass targetClass)
public static java.lang.String suggestGetterName(PsiField field)
public static java.lang.String suggestGetterName(java.lang.String name, PsiType type, Project project)
public static java.lang.String suggestSetterName(PsiField field)
public static java.lang.String suggestSetterName(java.lang.String name, PsiType type, Project project)
public static PsiMethod generateSetterPrototype(PsiField field, PsiClass aClass)