mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Simplifying methodDescriptor bean.
This commit is contained in:
+9
-9
@@ -49,21 +49,21 @@ public class GrDescriptorReturnTypeCalculator extends GrCallExpressionTypeCalcul
|
||||
|
||||
GrMethodReturnTypeDescriptor.Param[] params;
|
||||
|
||||
if (descriptor.anyParams != null) {
|
||||
assert descriptor.anyParams.length == 1;
|
||||
assert descriptor.params == null;
|
||||
assert pairs.isEmpty();
|
||||
|
||||
params = null;
|
||||
}
|
||||
else {
|
||||
if (descriptor.params != null) {
|
||||
params = descriptor.params;
|
||||
if (params == null) params = GrMethodReturnTypeDescriptor.Param.EMPTY_ARRAY;
|
||||
assert params != null;
|
||||
assert (descriptor.checkParamsType == null || descriptor.checkParamsType);
|
||||
|
||||
for (GrMethodReturnTypeDescriptor.Param param : params) {
|
||||
assert StringUtil.isNotEmpty(param.type);
|
||||
}
|
||||
}
|
||||
else if (descriptor.checkParamsType != null && descriptor.checkParamsType) {
|
||||
params = GrMethodReturnTypeDescriptor.Param.EMPTY_ARRAY;
|
||||
}
|
||||
else {
|
||||
params = null;
|
||||
}
|
||||
|
||||
assert StringUtil.isNotEmpty(descriptor.returnType);
|
||||
pairs.add(new Pair<GrMethodReturnTypeDescriptor.Param[], String>(params, descriptor.returnType));
|
||||
|
||||
+2
-7
@@ -23,9 +23,8 @@ public class GrMethodReturnTypeDescriptor {
|
||||
@Attribute("returnType")
|
||||
public String returnType;
|
||||
|
||||
@Property(surroundWithTag = false)
|
||||
@AbstractCollection(surroundWithTag = false)
|
||||
public AnyParams[] anyParams;
|
||||
@Attribute("checkParamsType")
|
||||
public Boolean checkParamsType;
|
||||
|
||||
@Property(surroundWithTag = false)
|
||||
@AbstractCollection(surroundWithTag = false)
|
||||
@@ -40,8 +39,4 @@ public class GrMethodReturnTypeDescriptor {
|
||||
public String type;
|
||||
}
|
||||
|
||||
@Tag("anyParams")
|
||||
public static class AnyParams {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user