Refactor PropertyPsiData

This commit is contained in:
Pavel V. Talanov
2012-10-31 20:49:34 +04:00
parent 4fcfddee38
commit 11355b3ea9
2 changed files with 7 additions and 7 deletions
@@ -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);
@@ -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() {