| Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/element/ElementFactory.java
|
| diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/element/ElementFactory.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/element/ElementFactory.java
|
| index 51f1c54ca6026a194eb7914f3fcf600f13fbafa4..b411690dd5a152f42cb697dd8a7c87b22598531b 100644
|
| --- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/element/ElementFactory.java
|
| +++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/element/ElementFactory.java
|
| @@ -262,6 +262,17 @@ public final class ElementFactory {
|
| return functionElement(functionName, null, normalParameters, names, namedParameters);
|
| }
|
|
|
| + public static FunctionElementImpl functionElementWithParameters(String functionName,
|
| + Type returnType, ParameterElement... parameters) {
|
| + FunctionElementImpl functionElement = new FunctionElementImpl(identifier(functionName));
|
| + functionElement.setReturnType(returnType == null ? VoidTypeImpl.getInstance() : returnType);
|
| + functionElement.setParameters(parameters);
|
| +
|
| + FunctionTypeImpl functionType = new FunctionTypeImpl(functionElement);
|
| + functionElement.setType(functionType);
|
| + return functionElement;
|
| + }
|
| +
|
| public static ClassElementImpl getObject() {
|
| if (objectElement == null) {
|
| objectElement = classElement("Object", (InterfaceType) null);
|
| @@ -340,6 +351,18 @@ public final class ElementFactory {
|
| return method;
|
| }
|
|
|
| + public static MethodElementImpl methodElementWithParameters(String methodName,
|
| + Type[] typeArguments, Type returnType, ParameterElement... parameters) {
|
| + MethodElementImpl method = new MethodElementImpl(identifier(methodName));
|
| + method.setParameters(parameters);
|
| + method.setReturnType(returnType);
|
| +
|
| + FunctionTypeImpl methodType = new FunctionTypeImpl(method);
|
| + methodType.setTypeArguments(typeArguments);
|
| + method.setType(methodType);
|
| + return method;
|
| + }
|
| +
|
| public static ParameterElementImpl namedParameter(String name) {
|
| ParameterElementImpl parameter = new ParameterElementImpl(identifier(name));
|
| parameter.setParameterKind(ParameterKind.NAMED);
|
|
|