Esempio n. 1
0
 protected void transform(final XtendField source, final JvmGenericType container) {
   super.transform(source, container);
   Set<EObject> _jvmElements = this._iJvmModelAssociations.getJvmElements(source);
   EObject _head = IterableExtensions.<EObject>head(_jvmElements);
   final JvmField field = ((JvmField) _head);
   boolean _equals = Objects.equal(field, null);
   if (_equals) {
     return;
   }
   JvmVisibility _visibility = field.getVisibility();
   boolean _equals_1 = Objects.equal(_visibility, JvmVisibility.PRIVATE);
   if (_equals_1) {
     field.setVisibility(JvmVisibility.DEFAULT);
   }
   boolean _isExtension = source.isExtension();
   if (_isExtension) {
     field.setVisibility(JvmVisibility.PUBLIC);
     EList<JvmAnnotationReference> _annotations = field.getAnnotations();
     JvmAnnotationReference _annotation =
         this.jvmTypesBuilder.toAnnotation(source, org.jnario.runner.Extension.class);
     this.jvmTypesBuilder.<JvmAnnotationReference>operator_add(_annotations, _annotation);
   }
 }
Esempio n. 2
0
 protected void setNameAndAssociate(
     final XtendFile file, final XtendTypeDeclaration xtendType, final JvmDeclaredType javaType) {
   super.setNameAndAssociate(file, xtendType, javaType);
   String _javaClassName = this._jnarioNameProvider.toJavaClassName(xtendType);
   javaType.setSimpleName(_javaClassName);
 }