All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nedap.archie.serializer.adl.rules.ExpressionVariableDeclarationSerializer Maven / Gradle / Ivy

There is a newer version: 3.12.0
Show newest version
package com.nedap.archie.serializer.adl.rules;

import com.nedap.archie.rules.ExpressionVariable;
import com.nedap.archie.serializer.adl.ADLRulesSerializer;

/**
 * Created by pieter.bos on 15/06/16.
 */
public class ExpressionVariableDeclarationSerializer extends RuleElementSerializer {

    public ExpressionVariableDeclarationSerializer(ADLRulesSerializer serializer) {
        super(serializer);
    }

    @Override
    public void serialize(ExpressionVariable variableDeclaration) {

        builder.append("$");
        builder.append(variableDeclaration.getName());
        builder.append(":");
        builder.append(variableDeclaration.getType().toString());
        builder.append(" ::= ");
        builder.indent();
        serializer.serializeRuleElement(variableDeclaration.getExpression());
        builder.newUnindentedLine();

    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy