public class ParameterInfoImpl extends java.lang.Object implements JavaParameterInfo
Modifier and Type | Field and Description |
---|---|
int |
oldParameterIndex |
NEW_PARAMETER
Constructor and Description |
---|
ParameterInfoImpl(int oldParameterIndex) |
ParameterInfoImpl(int oldParameterIndex,
java.lang.String name,
CanonicalTypes.Type typeWrapper,
java.lang.String defaultValue) |
ParameterInfoImpl(int oldParameterIndex,
java.lang.String name,
PsiType aType) |
ParameterInfoImpl(int oldParameterIndex,
java.lang.String name,
PsiType aType,
java.lang.String defaultValue) |
ParameterInfoImpl(int oldParameterIndex,
java.lang.String name,
PsiType aType,
java.lang.String defaultValue,
boolean useAnyVariable) |
Modifier and Type | Method and Description |
---|---|
static ParameterInfoImpl |
create(int oldParameterIndex) |
static ParameterInfoImpl |
createNew() |
PsiType |
createType(PsiElement context,
PsiManager manager) |
boolean |
equals(java.lang.Object o) |
static ParameterInfoImpl [] |
fromMethod(PsiMethod method)
Returns an array of
ParameterInfoImpl entries which correspond to given method signature. |
static ParameterInfoImpl [] |
fromMethodExceptParameter(PsiMethod method,
PsiParameter parameterToRemove)
Returns an array of
ParameterInfoImpl entries which correspond to given method signature with given parameter removed. |
java.lang.String |
getDefaultValue()
For added parameters, returns the string representation of the default parameter value.
|
java.lang.String |
getName()
Returns the name of the parameter after the refactoring.
|
int |
getOldIndex()
Returns the index of the parameter in the old parameter list, or
ParameterInfo.NEW_PARAMETER if the parameter
was added by the refactoring. |
java.lang.String |
getTypeText()
Returns parameter type text
|
CanonicalTypes.Type |
getTypeWrapper() |
PsiExpression |
getValue(PsiCallExpression expr) |
int |
hashCode() |
boolean |
isUseAnySingleVariable()
Flag whether refactoring should use any appropriate nearby variable as the default value
|
boolean |
isVarargType() |
void |
setDefaultValue(java.lang.String defaultValue) |
void |
setName(java.lang.String name)
Set parameter new name (to be changed to during refactoring)
|
void |
setType(PsiType type) |
void |
setUseAnySingleVariable(boolean useAnySingleVariable)
Flag whether refactoring should use any appropriate nearby variable as the default value
|
void |
updateFromMethod(PsiMethod method) |
ParameterInfoImpl |
useAnySingleVariable() |
ParameterInfoImpl |
withDefaultValue(java.lang.String defaultValue) |
ParameterInfoImpl |
withName(java.lang.String name) |
ParameterInfoImpl |
withType(CanonicalTypes.Type typeWrapper) |
ParameterInfoImpl |
withType(PsiType aType) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
createType, getActualValue
isNew
public ParameterInfoImpl(int oldParameterIndex)
create(int)
,
createNew()
public ParameterInfoImpl(int oldParameterIndex, java.lang.String name, PsiType aType)
create(int)
,
createNew()
,
withName(String)
,
withType(PsiType)
public ParameterInfoImpl(int oldParameterIndex, java.lang.String name, PsiType aType, java.lang.String defaultValue)
public ParameterInfoImpl(int oldParameterIndex, java.lang.String name, PsiType aType, java.lang.String defaultValue, boolean useAnyVariable)
public ParameterInfoImpl(int oldParameterIndex, java.lang.String name, CanonicalTypes.Type typeWrapper, java.lang.String defaultValue)
public int getOldIndex()
ParameterInfo
ParameterInfo.NEW_PARAMETER
if the parameter
was added by the refactoring.getOldIndex
in interface ParameterInfo
ParameterInfo.NEW_PARAMETER
.public void setUseAnySingleVariable(boolean useAnySingleVariable)
ParameterInfo
setUseAnySingleVariable
in interface ParameterInfo
useAnySingleVariable
- new valuepublic void updateFromMethod(PsiMethod method)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getTypeText()
ParameterInfo
getTypeText
in interface JavaParameterInfo
getTypeText
in interface ParameterInfo
public PsiType createType(PsiElement context, PsiManager manager) throws IncorrectOperationException
createType
in interface JavaParameterInfo
IncorrectOperationException
public void setType(PsiType type)
setType
in interface JavaParameterInfo
public java.lang.String getName()
ParameterInfo
getName
in interface ParameterInfo
public CanonicalTypes.Type getTypeWrapper()
getTypeWrapper
in interface JavaParameterInfo
public void setName(java.lang.String name)
ParameterInfo
setName
in interface ParameterInfo
name
- new namepublic boolean isVarargType()
isVarargType
in interface JavaParameterInfo
public PsiExpression getValue(PsiCallExpression expr) throws IncorrectOperationException
getValue
in interface JavaParameterInfo
IncorrectOperationException
public boolean isUseAnySingleVariable()
ParameterInfo
isUseAnySingleVariable
in interface ParameterInfo
public java.lang.String getDefaultValue()
ParameterInfo
getDefaultValue
in interface ParameterInfo
public void setDefaultValue(java.lang.String defaultValue)
public static ParameterInfoImpl [] fromMethod(PsiMethod method)
ParameterInfoImpl
entries which correspond to given method signature.method
- method to create an array frompublic static ParameterInfoImpl [] fromMethodExceptParameter(PsiMethod method, PsiParameter parameterToRemove)
ParameterInfoImpl
entries which correspond to given method signature with given parameter removed.method
- method to create an array fromparameterToRemove
- parameter to remove from method signaturepublic static ParameterInfoImpl createNew()
public static ParameterInfoImpl create(int oldParameterIndex)
public ParameterInfoImpl withName(java.lang.String name)
public ParameterInfoImpl withType(PsiType aType)
public ParameterInfoImpl withType(CanonicalTypes.Type typeWrapper)
public ParameterInfoImpl withDefaultValue(java.lang.String defaultValue)
public ParameterInfoImpl useAnySingleVariable()