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
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExpressionDef
concatStrings
(ExpressionDef... stringExpressions) Concat strings usingStringBuilder
.static ExpressionDef
concatStrings
(List<? extends ExpressionDef> stringExpressions) Concat strings usingStringBuilder
.static ExpressionDef
convertToStringIfNeeded
(ExpressionDef expression) Convert the expression toString
if it's not one.static ExpressionDef
equalsStructurally
(ExpressionDef.EqualsStructurally equalsStructurally) The equals structurally idiom.static ExpressionDef
equalsStructurally
(ExpressionDef left, ExpressionDef right) The equals structurally idiom.static ExpressionDef
getClass
(ExpressionDef.InvokeGetClassMethod invokeGetClassMethod) The get class idiom.static ExpressionDef
getPropertyValue
(ExpressionDef.GetPropertyValue getPropertyValue) The get property value idiom.static ExpressionDef
hashCode
(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 toString
if 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
-