Search in sources :

Example 11 with ComplexTypeLiteral

use of com.robotoworks.mechanoid.net.netModel.ComplexTypeLiteral in project mechanoid by robotoworks.

the class RequestGenerator method _generateGetterSetterForMember.

protected CharSequence _generateGetterSetterForMember(final SkipMember member) {
    StringConcatenation _builder = new StringConcatenation();
    ComplexTypeLiteral _literal = member.getLiteral();
    Object _generateGetterSetterForType = this.generateGetterSetterForType(_literal);
    _builder.append(_generateGetterSetterForType, "");
    _builder.newLineIfNotEmpty();
    return _builder;
}
Also used : StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) ComplexTypeLiteral(com.robotoworks.mechanoid.net.netModel.ComplexTypeLiteral)

Example 12 with ComplexTypeLiteral

use of com.robotoworks.mechanoid.net.netModel.ComplexTypeLiteral in project mechanoid by robotoworks.

the class JsonWriterStatementGenerator method _genStatement.

protected CharSequence _genStatement(final SkipMember skipMember) {
    StringConcatenation _builder = new StringConcatenation();
    _builder.newLine();
    _builder.append("\t");
    String _writerIdentifier = this.getWriterIdentifier();
    _builder.append(_writerIdentifier, "\t");
    _builder.append(".name(\"");
    String _name = skipMember.getName();
    _builder.append(_name, "\t");
    _builder.append("\");");
    _builder.newLineIfNotEmpty();
    _builder.append("\t");
    _builder.newLine();
    _builder.append("\t");
    ComplexTypeLiteral _literal = skipMember.getLiteral();
    EList<Member> _members = _literal.getMembers();
    Object _genWriteComplexTypeLiteralForMembers = this.genWriteComplexTypeLiteralForMembers(_members);
    _builder.append(_genWriteComplexTypeLiteralForMembers, "\t");
    _builder.newLineIfNotEmpty();
    return _builder;
}
Also used : StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) ComplexTypeLiteral(com.robotoworks.mechanoid.net.netModel.ComplexTypeLiteral) TypedMember(com.robotoworks.mechanoid.net.netModel.TypedMember) Member(com.robotoworks.mechanoid.net.netModel.Member) SkipMember(com.robotoworks.mechanoid.net.netModel.SkipMember)

Example 13 with ComplexTypeLiteral

use of com.robotoworks.mechanoid.net.netModel.ComplexTypeLiteral in project mechanoid by robotoworks.

the class RequestGenerator method _buildConstructorArgsForType.

protected void _buildConstructorArgsForType(final ComplexTypeLiteral type, final List<String> args) {
    EList<Member> _members = type.getMembers();
    for (final Member member : _members) {
        if ((member instanceof TypedMember)) {
            Type _type = ((TypedMember) member).getType();
            String _signature = ModelExtensions.signature(_type);
            String _plus = (_signature + " ");
            String _identifier = ModelExtensions.toIdentifier(member);
            String _plus_1 = (_plus + _identifier);
            args.add(_plus_1);
        } else {
            if ((member instanceof SkipMember)) {
                ComplexTypeLiteral _literal = ((SkipMember) member).getLiteral();
                this.buildConstructorArgsForType(_literal, args);
            }
        }
    }
}
Also used : StringType(com.robotoworks.mechanoid.net.netModel.StringType) Type(com.robotoworks.mechanoid.net.netModel.Type) BlockType(com.robotoworks.mechanoid.net.netModel.BlockType) IntrinsicType(com.robotoworks.mechanoid.net.netModel.IntrinsicType) UserType(com.robotoworks.mechanoid.net.netModel.UserType) GenericListType(com.robotoworks.mechanoid.net.netModel.GenericListType) TypedMember(com.robotoworks.mechanoid.net.netModel.TypedMember) TypedMember(com.robotoworks.mechanoid.net.netModel.TypedMember) SimpleMember(com.robotoworks.mechanoid.net.netModel.SimpleMember) Member(com.robotoworks.mechanoid.net.netModel.Member) SkipMember(com.robotoworks.mechanoid.net.netModel.SkipMember) ComplexTypeLiteral(com.robotoworks.mechanoid.net.netModel.ComplexTypeLiteral) SkipMember(com.robotoworks.mechanoid.net.netModel.SkipMember)

Aggregations

ComplexTypeLiteral (com.robotoworks.mechanoid.net.netModel.ComplexTypeLiteral)13 StringConcatenation (org.eclipse.xtend2.lib.StringConcatenation)10 Member (com.robotoworks.mechanoid.net.netModel.Member)6 SkipMember (com.robotoworks.mechanoid.net.netModel.SkipMember)6 TypedMember (com.robotoworks.mechanoid.net.netModel.TypedMember)6 EList (org.eclipse.emf.common.util.EList)3 BlockType (com.robotoworks.mechanoid.net.netModel.BlockType)2 GenericListType (com.robotoworks.mechanoid.net.netModel.GenericListType)2 IntrinsicType (com.robotoworks.mechanoid.net.netModel.IntrinsicType)2 Type (com.robotoworks.mechanoid.net.netModel.Type)2 UserType (com.robotoworks.mechanoid.net.netModel.UserType)2 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)2 ImportHelper (com.robotoworks.mechanoid.net.generator.ImportHelper)1 ComplexTypeDeclaration (com.robotoworks.mechanoid.net.netModel.ComplexTypeDeclaration)1 ResponseBlock (com.robotoworks.mechanoid.net.netModel.ResponseBlock)1 SimpleMember (com.robotoworks.mechanoid.net.netModel.SimpleMember)1 StringType (com.robotoworks.mechanoid.net.netModel.StringType)1 BasicEList (org.eclipse.emf.common.util.BasicEList)1 Function1 (org.eclipse.xtext.xbase.lib.Functions.Function1)1