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

org.faktorips.fl.UnaryOperation Maven / Gradle / Ivy

There is a newer version: 25.1.0.release
Show newest version
/*******************************************************************************
 * Copyright (c) Faktor Zehn GmbH - faktorzehn.org
 * 
 * This source code is available under the terms of the AGPL Affero General Public License version
 * 3.
 * 
 * Please see LICENSE.txt for full license terms, including the additional permissions and
 * restrictions as well as the possibility of alternative license terms.
 *******************************************************************************/

package org.faktorips.fl;

import org.faktorips.codegen.CodeFragment;
import org.faktorips.datatype.Datatype;

/**
 * An operation combining one operator with it's single operand.
 * 
 * @param  a {@link CodeFragment} implementation for a specific target language
 */
public interface UnaryOperation {

    String NOT = "!";

    /**
     * Returns the operator.
     */
    String getOperator();

    /**
     * Returns the {@link Datatype} of the operation's result.
     */
    Datatype getDatatype();

    /**
     * Generates the {@link CompilationResult} for the given operand.
     * 
     * @param arg the operand
     * @return the given operand combined with this operation's operator
     */
    CompilationResult generate(CompilationResult arg);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy