Refactor PropertyPsiData
This commit is contained in:
+2
-1
@@ -107,7 +107,8 @@ public final class JavaPropertyResolver {
|
||||
@NotNull Name propertyName,
|
||||
@NotNull String context
|
||||
) {
|
||||
Collection<PropertyPsiData> psiDataCollection = PropertyPsiData.collectGroupingValuesFromAccessors(namedMembers.getPropertyPsiDataElements());
|
||||
Collection<PropertyPsiData> psiDataCollection = PropertyPsiData.assemblePropertyPsiDataFromElements(
|
||||
namedMembers.getPropertyPsiDataElements());
|
||||
|
||||
Set<PropertyDescriptor> propertiesFromCurrent = new HashSet<PropertyDescriptor>(1);
|
||||
|
||||
|
||||
+5
-6
@@ -29,10 +29,14 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/*
|
||||
* Data from PSI related to one property used to resolve this property.
|
||||
*/
|
||||
public final class PropertyPsiData {
|
||||
|
||||
@NotNull
|
||||
public static Collection<PropertyPsiData> collectGroupingValuesFromAccessors(@NotNull List<PropertyPsiDataElement> elements) {
|
||||
public static Collection<PropertyPsiData> assemblePropertyPsiDataFromElements(@NotNull List<PropertyPsiDataElement> elements) {
|
||||
Map<String, PropertyPsiData> map = new HashMap<String, PropertyPsiData>();
|
||||
for (PropertyPsiDataElement element : elements) {
|
||||
String key = propertyKeyForGrouping(element);
|
||||
@@ -108,11 +112,6 @@ public final class PropertyPsiData {
|
||||
return setter;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public PropertyPsiDataElement getField() {
|
||||
return field;
|
||||
}
|
||||
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
@NotNull
|
||||
private Collection<PropertyPsiDataElement> getElements() {
|
||||
|
||||
Reference in New Issue
Block a user