use of org.eclipse.xtext.common.types.JvmVoid in project xtext-xtend by eclipse.
the class CompilationUnitImpl method toType.
public Type toType(final JvmType delegate) {
final Function1<JvmType, Type> _function = (JvmType it) -> {
Type _switchResult = null;
boolean _matched = false;
if (delegate instanceof JvmDeclaredType) {
_matched = true;
_switchResult = this.toTypeDeclaration(((JvmDeclaredType) delegate));
}
if (!_matched) {
if (delegate instanceof JvmTypeParameter) {
_matched = true;
_switchResult = this.toTypeParameterDeclaration(((JvmTypeParameter) delegate));
}
}
if (!_matched) {
if (delegate instanceof JvmVoid) {
_matched = true;
VoidTypeImpl _voidTypeImpl = new VoidTypeImpl();
final Procedure1<VoidTypeImpl> _function_1 = (VoidTypeImpl it_1) -> {
it_1.setDelegate(((JvmVoid) delegate));
it_1.setCompilationUnit(this);
};
_switchResult = ObjectExtensions.<VoidTypeImpl>operator_doubleArrow(_voidTypeImpl, _function_1);
}
}
if (!_matched) {
if (delegate instanceof JvmPrimitiveType) {
_matched = true;
PrimitiveTypeImpl _primitiveTypeImpl = new PrimitiveTypeImpl();
final Procedure1<PrimitiveTypeImpl> _function_1 = (PrimitiveTypeImpl it_1) -> {
it_1.setDelegate(((JvmPrimitiveType) delegate));
it_1.setCompilationUnit(this);
};
_switchResult = ObjectExtensions.<PrimitiveTypeImpl>operator_doubleArrow(_primitiveTypeImpl, _function_1);
}
}
return _switchResult;
};
return this.<JvmType, Type>getOrCreate(delegate, _function);
}
Aggregations