Package io.micronaut.sourcegen.model
Class JavaIdioms
java.lang.Object
io.micronaut.sourcegen.model.JavaIdioms
Java language idioms.
- Since:
- 1.5
- Author:
- Denis Stepanov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ExpressionDefconcatStrings(ExpressionDef... stringExpressions) Concat strings usingStringBuilder.static ExpressionDefconcatStrings(List<? extends ExpressionDef> stringExpressions) Concat strings usingStringBuilder.static ExpressionDefconvertToStringIfNeeded(ExpressionDef expression) Convert the expression toStringif it's not one.static ExpressionDefequalsStructurally(ExpressionDef.EqualsStructurally equalsStructurally) The equals structurally idiom.static ExpressionDefequalsStructurally(ExpressionDef left, ExpressionDef right) The equals structurally idiom.static ExpressionDefgetClass(ExpressionDef.InvokeGetClassMethod invokeGetClassMethod) The get class idiom.static ExpressionDefgetPropertyValue(ExpressionDef.GetPropertyValue getPropertyValue) The get property value idiom.static ExpressionDefhashCode(ExpressionDef.InvokeHashCodeMethod invokeHashCodeMethod) The hashCode idiom.
-
Constructor Details
-
JavaIdioms
public JavaIdioms()
-
-
Method Details
-
concatStrings
Concat strings usingStringBuilder.- Parameters:
stringExpressions- The expression- Returns:
- The string builder expression
-
concatStrings
Concat strings usingStringBuilder.- Parameters:
stringExpressions- The expression- Returns:
- The string builder expression
-
convertToStringIfNeeded
Convert the expression toStringif it's not one.- Parameters:
expression- The expression- Returns:
- The string expression
-
equalsStructurally
The equals structurally idiom.- Parameters:
equalsStructurally- The expression- Returns:
- The idiom expression
-
equalsStructurally
The equals structurally idiom.- Parameters:
left- The left expressionright- The left expression- Returns:
- The idiom expression
- Since:
- 1.5
-
hashCode
The hashCode idiom.- Parameters:
invokeHashCodeMethod- The expression- Returns:
- The idiom expression
-
getClass
The get class idiom.- Parameters:
invokeGetClassMethod- The expression- Returns:
- The idiom expression
-
getPropertyValue
The get property value idiom.- Parameters:
getPropertyValue- The expression- Returns:
- The idiom expression
-