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

org.opalj.br.instructions.UnaryArithmeticInstruction.scala Maven / Gradle / Ivy

The newest version!
/* BSD 2-Clause License - see OPAL/LICENSE for details. */
package org.opalj
package br
package instructions

/**
 * Implemented by all arithmetic instructions that have one (runtime-dependent) operand;
 * i.e., the [[NegateInstruction]]s.
 *
 * @author Michael Eichberg
 */
trait UnaryArithmeticInstruction extends ArithmeticInstruction {

    def isPrefixOperator: Boolean

    def isPostfixOperator: Boolean = !isPrefixOperator

}

object UnaryArithmeticInstruction {

    def unapply(instruction: UnaryArithmeticInstruction): Option[ComputationalType] = {
        Some(instruction.computationalType)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy