blob: 734d1b7e088e1a1d33d3258585995430d01504db [file] [log] [blame]
/**
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*
*
* This copyright notice shows up in the generated Java code
*/
package org.eclipse.osbp.xtext.functionlibrarydsl.jvmmodel;
import com.google.common.base.Objects;
import com.google.inject.Inject;
import java.util.Arrays;
import java.util.Locale;
import java.util.function.Consumer;
import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.osbp.bpm.api.BlipBaseFunctionGroup;
import org.eclipse.osbp.dsl.semantic.common.types.LDataType;
import org.eclipse.osbp.ui.api.functionlibrary.IFunctionLibraryGroup;
import org.eclipse.osbp.ui.api.functionlibrary.IFunctionLibraryPackage;
import org.eclipse.osbp.utils.annotation.CommonUtils;
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionConvertToModel;
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionConvertToPresentation;
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryBaseFunction;
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryBlipGroup;
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryConverterGroup;
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryFunction;
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryGroup;
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryGuard;
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryOperation;
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryPackage;
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryParameter;
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryRate;
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryRating;
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryRatingItem;
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryTest;
import org.eclipse.xtend2.lib.StringConcatenation;
import org.eclipse.xtext.common.types.JvmAnnotationReference;
import org.eclipse.xtext.common.types.JvmEnumerationLiteral;
import org.eclipse.xtext.common.types.JvmEnumerationType;
import org.eclipse.xtext.common.types.JvmField;
import org.eclipse.xtext.common.types.JvmFormalParameter;
import org.eclipse.xtext.common.types.JvmGenericType;
import org.eclipse.xtext.common.types.JvmMember;
import org.eclipse.xtext.common.types.JvmOperation;
import org.eclipse.xtext.common.types.JvmParameterizedTypeReference;
import org.eclipse.xtext.common.types.JvmTypeReference;
import org.eclipse.xtext.common.types.JvmVisibility;
import org.eclipse.xtext.xbase.XExpression;
import org.eclipse.xtext.xbase.compiler.output.ITreeAppendable;
import org.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer;
import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor;
import org.eclipse.xtext.xbase.jvmmodel.JvmTypesBuilder;
import org.eclipse.xtext.xbase.lib.Exceptions;
import org.eclipse.xtext.xbase.lib.Extension;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.osgi.service.component.annotations.Component;
import org.slf4j.Logger;
/**
* <p>Infers a JVM model from the source model.</p>
*
* <p>The JVM model should contain all elements that would appear in the Java code
* which is generated from the source model. Other models link against the JVM model rather than the source model.</p>
*/
@SuppressWarnings("all")
public class FunctionLibraryDslJvmModelInferrer extends AbstractModelInferrer {
protected static final class MethodParamHelper {
private String name;
private JvmTypeReference reference;
public MethodParamHelper(final String aname, final JvmTypeReference areference) {
this.name = aname;
this.reference = areference;
}
}
public final static String FUNCTION_LIBRARY_PACKAGE = "FunctionLibraryPackage";
/**
* generate the class name for a mock entity
*/
public static String getFunctionLibraryPackageName(final FunctionLibraryPackage pckg) {
StringConcatenation _builder = new StringConcatenation();
String _name = pckg.getName();
_builder.append(_name, "");
String pckgName = _builder.toString();
return pckgName;
}
/**
* convenience API to build and initialize JVM types and their members.
*/
@Inject
@Extension
private JvmTypesBuilder _jvmTypesBuilder;
@Inject
@Extension
private CommonUtils _commonUtils;
protected void _infer(final FunctionLibraryPackage pkg, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) {
try {
StringConcatenation _builder = new StringConcatenation();
String _functionLibraryPackageName = FunctionLibraryDslJvmModelInferrer.getFunctionLibraryPackageName(pkg);
_builder.append(_functionLibraryPackageName, "");
_builder.append(".");
_builder.append(FunctionLibraryDslJvmModelInferrer.FUNCTION_LIBRARY_PACKAGE, "");
final String generatorName = _builder.toString();
JvmGenericType _class = this._jvmTypesBuilder.toClass(pkg, generatorName);
final Procedure1<JvmGenericType> _function = new Procedure1<JvmGenericType>() {
public void apply(final JvmGenericType it) {
JvmAnnotationReference annotationRef = FunctionLibraryDslJvmModelInferrer.this._annotationTypesBuilder.annotationRef(Component.class);
JvmTypeReference _typeRef = FunctionLibraryDslJvmModelInferrer.this._typeReferenceBuilder.typeRef(IFunctionLibraryPackage.class);
FunctionLibraryDslJvmModelInferrer.this._commonUtils.addAnnAttr(annotationRef, pkg, "service", ((JvmTypeReference) _typeRef));
EList<JvmAnnotationReference> _annotations = it.getAnnotations();
FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.<JvmAnnotationReference>operator_add(_annotations, annotationRef);
EList<JvmTypeReference> _superTypes = it.getSuperTypes();
JvmTypeReference _typeRef_1 = FunctionLibraryDslJvmModelInferrer.this._typeReferenceBuilder.typeRef(IFunctionLibraryPackage.class);
FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.<JvmTypeReference>operator_add(_superTypes, _typeRef_1);
it.setFinal(true);
}
};
acceptor.<JvmGenericType>accept(_class, _function);
} catch (final Throwable _t) {
if (_t instanceof Exception) {
final Exception e = (Exception)_t;
e.printStackTrace();
} else {
throw Exceptions.sneakyThrow(_t);
}
}
EList<FunctionLibraryRating> _ratings = pkg.getRatings();
final Consumer<FunctionLibraryRating> _function_1 = new Consumer<FunctionLibraryRating>() {
public void accept(final FunctionLibraryRating rating) {
try {
String _name = pkg.getName();
String _concat = _name.concat(".");
String _name_1 = rating.getName();
String _concat_1 = _concat.concat(_name_1);
final Procedure1<JvmEnumerationType> _function = new Procedure1<JvmEnumerationType>() {
public void apply(final JvmEnumerationType it) {
}
};
JvmEnumerationType _enumerationType = FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.toEnumerationType(rating, _concat_1, _function);
final Procedure1<JvmEnumerationType> _function_1 = new Procedure1<JvmEnumerationType>() {
public void apply(final JvmEnumerationType it) {
String _documentation = FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.getDocumentation(rating);
FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.setDocumentation(it, _documentation);
EList<FunctionLibraryRatingItem> _items = rating.getItems();
final Consumer<FunctionLibraryRatingItem> _function = new Consumer<FunctionLibraryRatingItem>() {
public void accept(final FunctionLibraryRatingItem item) {
EList<JvmMember> _members = it.getMembers();
String _name = item.getName();
final Procedure1<JvmEnumerationLiteral> _function = new Procedure1<JvmEnumerationLiteral>() {
public void apply(final JvmEnumerationLiteral it) {
String _documentation = FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.getDocumentation(item);
FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.setDocumentation(it, _documentation);
}
};
JvmEnumerationLiteral _enumerationLiteral = FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.toEnumerationLiteral(pkg, _name, _function);
FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.<JvmEnumerationLiteral>operator_add(_members, _enumerationLiteral);
}
};
_items.forEach(_function);
}
};
acceptor.<JvmEnumerationType>accept(_enumerationType, _function_1);
} catch (final Throwable _t) {
if (_t instanceof Exception) {
final Exception e = (Exception)_t;
e.printStackTrace();
} else {
throw Exceptions.sneakyThrow(_t);
}
}
}
};
_ratings.forEach(_function_1);
EList<FunctionLibraryGroup> _groups = pkg.getGroups();
final Consumer<FunctionLibraryGroup> _function_2 = new Consumer<FunctionLibraryGroup>() {
public void accept(final FunctionLibraryGroup group) {
try {
String _name = pkg.getName();
String _concat = _name.concat(".");
String _name_1 = group.getName();
String _concat_1 = _concat.concat(_name_1);
JvmGenericType _class = FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.toClass(pkg, _concat_1);
final Procedure1<JvmGenericType> _function = new Procedure1<JvmGenericType>() {
public void apply(final JvmGenericType it) {
EList<JvmTypeReference> _superTypes = it.getSuperTypes();
JvmTypeReference _typeRef = FunctionLibraryDslJvmModelInferrer.this._typeReferenceBuilder.typeRef(IFunctionLibraryGroup.class);
FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.<JvmTypeReference>operator_add(_superTypes, _typeRef);
if ((group instanceof FunctionLibraryBlipGroup)) {
EList<JvmTypeReference> _superTypes_1 = it.getSuperTypes();
JvmTypeReference _typeRef_1 = FunctionLibraryDslJvmModelInferrer.this._typeReferenceBuilder.typeRef(BlipBaseFunctionGroup.class);
FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.<JvmTypeReference>operator_add(_superTypes_1, _typeRef_1);
}
String _documentation = FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.getDocumentation(group);
FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.setDocumentation(it, _documentation);
FunctionLibraryDslJvmModelInferrer.this.toFields(it, group);
it.setFinal(true);
EList<FunctionLibraryFunction> _functions = group.getFunctions();
final Consumer<FunctionLibraryFunction> _function = new Consumer<FunctionLibraryFunction>() {
public void accept(final FunctionLibraryFunction function) {
EList<JvmMember> _members = it.getMembers();
JvmTypeReference _elvis = null;
JvmParameterizedTypeReference _oftype = function.getOftype();
if (_oftype != null) {
_elvis = _oftype;
} else {
JvmTypeReference _inferredType = FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.inferredType();
_elvis = _inferredType;
}
JvmOperation _method = FunctionLibraryDslJvmModelInferrer.this.toMethod(function, _elvis);
FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _method);
}
};
_functions.forEach(_function);
EList<FunctionLibraryOperation> _operations = group.getOperations();
final Consumer<FunctionLibraryOperation> _function_1 = new Consumer<FunctionLibraryOperation>() {
public void accept(final FunctionLibraryOperation operation) {
EList<JvmMember> _members = it.getMembers();
JvmTypeReference _typeRef = FunctionLibraryDslJvmModelInferrer.this._typeReferenceBuilder.typeRef(boolean.class);
JvmOperation _method = FunctionLibraryDslJvmModelInferrer.this.toMethod(operation, _typeRef);
FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _method);
}
};
_operations.forEach(_function_1);
EList<FunctionLibraryRate> _rates = group.getRates();
final Consumer<FunctionLibraryRate> _function_2 = new Consumer<FunctionLibraryRate>() {
public void accept(final FunctionLibraryRate rate) {
EList<JvmMember> _members = it.getMembers();
String _name = pkg.getName();
String _concat = _name.concat(".");
FunctionLibraryRating _oftype = rate.getOftype();
String _name_1 = _oftype.getName();
String _concat_1 = _concat.concat(_name_1);
JvmTypeReference _typeRef = FunctionLibraryDslJvmModelInferrer.this._typeReferenceBuilder.typeRef(_concat_1);
JvmOperation _method = FunctionLibraryDslJvmModelInferrer.this.toMethod(rate, _typeRef);
FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _method);
}
};
_rates.forEach(_function_2);
EList<FunctionLibraryTest> _tests = group.getTests();
final Consumer<FunctionLibraryTest> _function_3 = new Consumer<FunctionLibraryTest>() {
public void accept(final FunctionLibraryTest test) {
EList<JvmMember> _members = it.getMembers();
JvmTypeReference _typeRef = FunctionLibraryDslJvmModelInferrer.this._typeReferenceBuilder.typeRef(boolean.class);
JvmOperation _method = FunctionLibraryDslJvmModelInferrer.this.toMethod(test, _typeRef);
FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _method);
}
};
_tests.forEach(_function_3);
EList<FunctionLibraryGuard> _guards = group.getGuards();
final Consumer<FunctionLibraryGuard> _function_4 = new Consumer<FunctionLibraryGuard>() {
public void accept(final FunctionLibraryGuard guard) {
EList<JvmMember> _members = it.getMembers();
JvmTypeReference _typeRef = FunctionLibraryDslJvmModelInferrer.this._typeReferenceBuilder.typeRef(boolean.class);
JvmOperation _method = FunctionLibraryDslJvmModelInferrer.this.toMethod(guard, _typeRef);
FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _method);
}
};
_guards.forEach(_function_4);
if ((group instanceof FunctionLibraryConverterGroup)) {
FunctionLibraryConverterGroup converterGroup = ((FunctionLibraryConverterGroup) group);
FunctionConvertToModel _convertToModel = converterGroup.getConvertToModel();
boolean _notEquals = (!Objects.equal(_convertToModel, null));
if (_notEquals) {
BasicEList<FunctionLibraryDslJvmModelInferrer.MethodParamHelper> mustParams = new BasicEList<FunctionLibraryDslJvmModelInferrer.MethodParamHelper>();
LDataType _convertToModelDatatype = converterGroup.getConvertToModelDatatype();
JvmTypeReference _jvmTypeReference = _convertToModelDatatype.getJvmTypeReference();
FunctionLibraryDslJvmModelInferrer.MethodParamHelper _methodParamHelper = new FunctionLibraryDslJvmModelInferrer.MethodParamHelper("presentationValue", _jvmTypeReference);
mustParams.add(_methodParamHelper);
JvmTypeReference _typeRef_2 = FunctionLibraryDslJvmModelInferrer.this._typeReferenceBuilder.typeRef(Locale.class);
FunctionLibraryDslJvmModelInferrer.MethodParamHelper _methodParamHelper_1 = new FunctionLibraryDslJvmModelInferrer.MethodParamHelper("presentationLocale", _typeRef_2);
mustParams.add(_methodParamHelper_1);
JvmTypeReference _typeRef_3 = FunctionLibraryDslJvmModelInferrer.this._typeReferenceBuilder.typeRef(Object.class);
JvmTypeReference _addArrayTypeDimension = FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.addArrayTypeDimension(_typeRef_3);
FunctionLibraryDslJvmModelInferrer.MethodParamHelper _methodParamHelper_2 = new FunctionLibraryDslJvmModelInferrer.MethodParamHelper("presentationParams", _addArrayTypeDimension);
mustParams.add(_methodParamHelper_2);
EList<JvmMember> _members = it.getMembers();
FunctionConvertToModel _convertToModel_1 = converterGroup.getConvertToModel();
LDataType _convertToModelDatatype_1 = converterGroup.getConvertToModelDatatype();
JvmTypeReference _jvmTypeReference_1 = _convertToModelDatatype_1.getJvmTypeReference();
JvmOperation _method = FunctionLibraryDslJvmModelInferrer.this.toMethod(_convertToModel_1, "valueToModelConverter", _jvmTypeReference_1, mustParams);
FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _method);
}
FunctionConvertToPresentation _convertToPresentation = converterGroup.getConvertToPresentation();
boolean _notEquals_1 = (!Objects.equal(_convertToPresentation, null));
if (_notEquals_1) {
BasicEList<FunctionLibraryDslJvmModelInferrer.MethodParamHelper> mustParams_1 = new BasicEList<FunctionLibraryDslJvmModelInferrer.MethodParamHelper>();
LDataType _convertToModelDatatype_2 = converterGroup.getConvertToModelDatatype();
JvmTypeReference _jvmTypeReference_2 = _convertToModelDatatype_2.getJvmTypeReference();
FunctionLibraryDslJvmModelInferrer.MethodParamHelper _methodParamHelper_3 = new FunctionLibraryDslJvmModelInferrer.MethodParamHelper("modelValue", _jvmTypeReference_2);
mustParams_1.add(_methodParamHelper_3);
JvmTypeReference _typeRef_4 = FunctionLibraryDslJvmModelInferrer.this._typeReferenceBuilder.typeRef(Locale.class);
FunctionLibraryDslJvmModelInferrer.MethodParamHelper _methodParamHelper_4 = new FunctionLibraryDslJvmModelInferrer.MethodParamHelper("modelLocale", _typeRef_4);
mustParams_1.add(_methodParamHelper_4);
JvmTypeReference _typeRef_5 = FunctionLibraryDslJvmModelInferrer.this._typeReferenceBuilder.typeRef(Object.class);
JvmTypeReference _addArrayTypeDimension_1 = FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.addArrayTypeDimension(_typeRef_5);
FunctionLibraryDslJvmModelInferrer.MethodParamHelper _methodParamHelper_5 = new FunctionLibraryDslJvmModelInferrer.MethodParamHelper("modelParams", _addArrayTypeDimension_1);
mustParams_1.add(_methodParamHelper_5);
EList<JvmMember> _members_1 = it.getMembers();
FunctionConvertToPresentation _convertToPresentation_1 = converterGroup.getConvertToPresentation();
LDataType _convertToPresentationDatatype = converterGroup.getConvertToPresentationDatatype();
JvmTypeReference _jvmTypeReference_3 = _convertToPresentationDatatype.getJvmTypeReference();
JvmOperation _method_1 = FunctionLibraryDslJvmModelInferrer.this.toMethod(_convertToPresentation_1, "valueToPresentationConverter", _jvmTypeReference_3, mustParams_1);
FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.<JvmOperation>operator_add(_members_1, _method_1);
}
}
}
};
acceptor.<JvmGenericType>accept(_class, _function);
} catch (final Throwable _t) {
if (_t instanceof Exception) {
final Exception e = (Exception)_t;
e.printStackTrace();
} else {
throw Exceptions.sneakyThrow(_t);
}
}
}
};
_groups.forEach(_function_2);
}
public JvmOperation toMethod(final FunctionLibraryBaseFunction baseFunction, final JvmTypeReference returnType) {
String _name = baseFunction.getName();
return this.toMethod(baseFunction, _name, returnType, null);
}
public JvmOperation toMethod(final FunctionLibraryBaseFunction baseFunction, final String methodName, final JvmTypeReference returnType, final EList<FunctionLibraryDslJvmModelInferrer.MethodParamHelper> mustParams) {
final Procedure1<JvmOperation> _function = new Procedure1<JvmOperation>() {
public void apply(final JvmOperation it) {
String _documentation = FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.getDocumentation(baseFunction);
FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.setDocumentation(it, _documentation);
boolean _notEquals = (!Objects.equal(mustParams, null));
if (_notEquals) {
for (final FunctionLibraryDslJvmModelInferrer.MethodParamHelper param : mustParams) {
EList<JvmFormalParameter> _parameters = it.getParameters();
JvmFormalParameter _parameter = FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.toParameter(baseFunction, param.name, param.reference);
FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.<JvmFormalParameter>operator_add(_parameters, _parameter);
}
}
EList<FunctionLibraryParameter> _params = baseFunction.getParams();
for (final FunctionLibraryParameter param_1 : _params) {
EList<JvmFormalParameter> _parameters_1 = it.getParameters();
String _name = param_1.getName();
JvmTypeReference _parameterType = param_1.getParameterType();
JvmFormalParameter _parameter_1 = FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.toParameter(param_1, _name, _parameterType);
FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.<JvmFormalParameter>operator_add(_parameters_1, _parameter_1);
}
it.setStatic(true);
it.setFinal(true);
it.setVisibility(JvmVisibility.PUBLIC);
XExpression _body = baseFunction.getBody();
FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.setBody(it, _body);
}
};
return this._jvmTypesBuilder.toMethod(baseFunction, methodName, returnType, _function);
}
public void toFields(final JvmGenericType type, final FunctionLibraryGroup group) {
JvmField field = null;
JvmTypeReference _typeRef = this._typeReferenceBuilder.typeRef(Logger.class);
final Procedure1<JvmField> _function = new Procedure1<JvmField>() {
public void apply(final JvmField it) {
final Procedure1<ITreeAppendable> _function = new Procedure1<ITreeAppendable>() {
public void apply(final ITreeAppendable it) {
StringConcatenation _builder = new StringConcatenation();
_builder.append("org.slf4j.LoggerFactory.getLogger(\"functiongroup\")");
it.append(_builder);
}
};
FunctionLibraryDslJvmModelInferrer.this._jvmTypesBuilder.setInitializer(it, _function);
}
};
JvmField _field = this._jvmTypesBuilder.toField(group, "log", _typeRef, _function);
field = _field;
field.setStatic(true);
field.setVisibility(JvmVisibility.PRIVATE);
EList<JvmMember> _members = type.getMembers();
this._jvmTypesBuilder.<JvmField>operator_add(_members, field);
}
public void infer(final EObject pkg, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) {
if (pkg instanceof FunctionLibraryPackage) {
_infer((FunctionLibraryPackage)pkg, acceptor, isPreIndexingPhase);
return;
} else if (pkg != null) {
_infer(pkg, acceptor, isPreIndexingPhase);
return;
} else {
throw new IllegalArgumentException("Unhandled parameter types: " +
Arrays.<Object>asList(pkg, acceptor, isPreIndexingPhase).toString());
}
}
}