public final class FieldFromParameterUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
createFieldAndAddAssignment(Project project,
PsiClass targetClass,
PsiMethod method,
PsiParameter parameter,
PsiType fieldType,
java.lang.String fieldName,
boolean isStatic,
boolean isFinal) |
static int |
findFieldAssignmentAnchor(PsiStatement[] statements,
Ref<? super Pair<PsiField,java.lang.Boolean>> anchorRef,
PsiClass targetClass,
PsiParameter myParameter) |
static PsiParameter |
findParameterAtCursor(PsiFile file,
Editor editor) |
static PsiField |
getParameterAssignedToField(PsiParameter parameter) |
static PsiField |
getParameterAssignedToField(PsiParameter parameter,
boolean findIndirectAssignments) |
static PsiType |
getSubstitutedType(PsiParameter parameter) |
static PsiType |
getType(PsiParameter myParameter) |
static boolean |
isAvailable(PsiParameter myParameter,
PsiType type,
PsiClass targetClass) |
static boolean |
isAvailable(PsiParameter myParameter,
PsiType type,
PsiClass targetClass,
boolean findIndirectAssignments) |
public static PsiParameter findParameterAtCursor(PsiFile file, Editor editor)
public static PsiType getType(PsiParameter myParameter)
public static PsiType getSubstitutedType(PsiParameter parameter)
public static PsiField getParameterAssignedToField(PsiParameter parameter)
public static PsiField getParameterAssignedToField(PsiParameter parameter, boolean findIndirectAssignments)
public static int findFieldAssignmentAnchor(PsiStatement[] statements, Ref<? super Pair<PsiField,java.lang.Boolean>> anchorRef, PsiClass targetClass, PsiParameter myParameter)
public static void createFieldAndAddAssignment(Project project, PsiClass targetClass, PsiMethod method, PsiParameter parameter, PsiType fieldType, java.lang.String fieldName, boolean isStatic, boolean isFinal) throws IncorrectOperationException
IncorrectOperationException
public static boolean isAvailable(PsiParameter myParameter, PsiType type, PsiClass targetClass)
public static boolean isAvailable(PsiParameter myParameter, PsiType type, PsiClass targetClass, boolean findIndirectAssignments)