Search in sources :

Example 6 with IntrinsicType

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

the class RequestGenerator method _buildConstructorArgsForType.

protected void _buildConstructorArgsForType(final GenericListType type, final List<String> args) {
    Type _elementType = type.getElementType();
    if ((_elementType instanceof IntrinsicType)) {
        String _signature = ModelExtensions.signature(type);
        String _plus = (_signature + " values");
        args.add(_plus);
    } else {
        String _signature_1 = ModelExtensions.signature(type);
        String _plus_1 = (_signature_1 + " ");
        String _innerSignature = ModelExtensions.innerSignature(type);
        String _camelize = Strings.camelize(_innerSignature);
        String _pluralize = Strings.pluralize(_camelize);
        String _plus_2 = (_plus_1 + _pluralize);
        args.add(_plus_2);
    }
}
Also used : IntrinsicType(com.robotoworks.mechanoid.net.netModel.IntrinsicType) 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)

Aggregations

IntrinsicType (com.robotoworks.mechanoid.net.netModel.IntrinsicType)6 BlockType (com.robotoworks.mechanoid.net.netModel.BlockType)3 Literal (com.robotoworks.mechanoid.net.netModel.Literal)3 SimpleMember (com.robotoworks.mechanoid.net.netModel.SimpleMember)3 SimpleMemberAssignment (com.robotoworks.mechanoid.net.netModel.SimpleMemberAssignment)3 StringType (com.robotoworks.mechanoid.net.netModel.StringType)3 ComplexTypeLiteral (com.robotoworks.mechanoid.net.netModel.ComplexTypeLiteral)2 Header (com.robotoworks.mechanoid.net.netModel.Header)2 HeaderBlock (com.robotoworks.mechanoid.net.netModel.HeaderBlock)2 ParamsBlock (com.robotoworks.mechanoid.net.netModel.ParamsBlock)2 StringConcatenation (org.eclipse.xtend2.lib.StringConcatenation)2 BodyBlock (com.robotoworks.mechanoid.net.netModel.BodyBlock)1 BooleanLiteral (com.robotoworks.mechanoid.net.netModel.BooleanLiteral)1 BooleanType (com.robotoworks.mechanoid.net.netModel.BooleanType)1 GenericListType (com.robotoworks.mechanoid.net.netModel.GenericListType)1 NumericLiteral (com.robotoworks.mechanoid.net.netModel.NumericLiteral)1 NumericType (com.robotoworks.mechanoid.net.netModel.NumericType)1 Path (com.robotoworks.mechanoid.net.netModel.Path)1 StringLiteral (com.robotoworks.mechanoid.net.netModel.StringLiteral)1 Type (com.robotoworks.mechanoid.net.netModel.Type)1