Class JavaIdioms

java.lang.Object
io.micronaut.sourcegen.model.JavaIdioms

@Internal public final class JavaIdioms extends Object
Java language idioms.
Since:
1.5
Author:
Denis Stepanov
  • Constructor Details

    • JavaIdioms

      public JavaIdioms()
  • Method Details

    • concatStrings

      public static ExpressionDef concatStrings(ExpressionDef... stringExpressions)
      Concat strings using StringBuilder.
      Parameters:
      stringExpressions - The expression
      Returns:
      The string builder expression
    • concatStrings

      public static ExpressionDef concatStrings(List<? extends ExpressionDef> stringExpressions)
      Concat strings using StringBuilder.
      Parameters:
      stringExpressions - The expression
      Returns:
      The string builder expression
    • convertToStringIfNeeded

      public static ExpressionDef convertToStringIfNeeded(ExpressionDef expression)
      Convert the expression to String if it's not one.
      Parameters:
      expression - The expression
      Returns:
      The string expression
    • equalsStructurally

      public static ExpressionDef equalsStructurally(ExpressionDef.EqualsStructurally equalsStructurally)
      The equals structurally idiom.
      Parameters:
      equalsStructurally - The expression
      Returns:
      The idiom expression
    • equalsStructurally

      public static ExpressionDef equalsStructurally(ExpressionDef left, ExpressionDef right)
      The equals structurally idiom.
      Parameters:
      left - The left expression
      right - The left expression
      Returns:
      The idiom expression
      Since:
      1.5
    • hashCode

      public static ExpressionDef hashCode(ExpressionDef.InvokeHashCodeMethod invokeHashCodeMethod)
      The hashCode idiom.
      Parameters:
      invokeHashCodeMethod - The expression
      Returns:
      The idiom expression
    • getClass

      public static ExpressionDef getClass(ExpressionDef.InvokeGetClassMethod invokeGetClassMethod)
      The get class idiom.
      Parameters:
      invokeGetClassMethod - The expression
      Returns:
      The idiom expression
    • getPropertyValue

      public static ExpressionDef getPropertyValue(ExpressionDef.GetPropertyValue getPropertyValue)
      The get property value idiom.
      Parameters:
      getPropertyValue - The expression
      Returns:
      The idiom expression