Class BinaryExpression

java.lang.Object
io.sundr.model.BinaryExpression
All Implemented Interfaces:
Expression, ExpressionOrStatement, Node, Renderable, Statement, WithReferences
Direct Known Subclasses:
BitwiseAnd, BitwiseOr, Divide, Equals, GreaterThan, GreaterThanOrEqual, LeftShift, LessThan, LessThanOrEqual, LogicalAnd, LogicalOr, Minus, Modulo, Multiply, NotEquals, Plus, RightShift, RightUnsignedShift, Xor

public class BinaryExpression extends Object implements ExpressionOrStatement
Represents a binary expression with a left and right operand. While it does not have value to use as a statement, the language allows it.
  • Constructor Details

  • Method Details

    • getSymbol

      public String getSymbol()
    • getLeft

      public Expression getLeft()
    • getRight

      public Expression getRight()
    • getReferences

      public Set<ClassRef> getReferences()
      Specified by:
      getReferences in interface WithReferences
    • render

      public String render()
      Description copied from interface: Renderable
      Render the type into a String for the purpose of code generation. This is slightly different from the `toString()` method as `toString()` is mostly needed for logging / debugging and should be idempotent. Regarding idempotency this method may yield different result based on the context it is used even if the internal state of the object does not change. An example of such case, is a reference to class that may change based on the package from which it's refenced.
      Specified by:
      render in interface Renderable
      Returns:
      the String representation of the object as it's meant to appear in the generated code.