Class LambdaSpecImpl
java.lang.Object
org.tquadrat.foundation.javacomposer.internal.LambdaSpecImpl
- All Implemented Interfaces:
LambdaSpec
@ClassVersion(sourceVersion="$Id: LambdaSpecImpl.java 1105 2024-02-28 12:58:46Z tquadrat $")
@API(status=INTERNAL,
since="0.0.5")
public final class LambdaSpecImpl
extends Object
implements LambdaSpec
The implementation for
LambdaSpec.- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: LambdaSpecImpl.java 1105 2024-02-28 12:58:46Z tquadrat $
- Since:
- 0.0.5
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.javacomposer.internal.LambdaSpecImpl"
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.tquadrat.foundation.javacomposer.LambdaSpec
LambdaSpec.Builder -
Field Summary
FieldsModifier and TypeFieldDescriptionLazily initialised return value oftoString()for this instance.private final CodeBlockImplThe code of the body for this lambda.private final JavaComposerThe reference to the factory.private final booleanFlag that indicates whether the parameter types will be inferred.private final booleanThe flag that indicates the emit format.private final List<ParameterSpecImpl> The parameters of this method. -
Constructor Summary
ConstructorsConstructorDescriptionLambdaSpecImpl(LambdaSpecImpl.BuilderImpl builder) Creates a newLambdaSpecImplinstance. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidemit(CodeWriter codeWriter) Emits this lambda to the given code writer.final booleanfinal JavaComposerReturns theJavaComposerfactory.final inthashCode()private final StringThe initializer form_CachedString.Creates a new builder that is initialised with the components of this lambda.final StringtoString()
-
Field Details
-
m_CachedString
Lazily initialised return value oftoString()for this instance. -
m_Code
The code of the body for this lambda. -
m_Composer
The reference to the factory. -
m_InferTypes
Flag that indicates whether the parameter types will be inferred. -
m_IsMultiLine
The flag that indicates the emit format.truestands for the multi-line format with curly braces and a return statement,falsefor the single line format. -
m_Parameters
The parameters of this method.
-
-
Constructor Details
-
LambdaSpecImpl
Creates a newLambdaSpecImplinstance.- Parameters:
builder- The builder.
-
-
Method Details
-
emit
Emits this lambda to the given code writer.- Parameters:
codeWriter- The code writer.- Throws:
UncheckedIOException- A problem occurred when writing to the output target.
-
equals
- Specified by:
equalsin interfaceLambdaSpec- Overrides:
equalsin classObject
-
getFactory
Returns theJavaComposerfactory.- Returns:
- The reference to the factory.
-
hashCode
- Specified by:
hashCodein interfaceLambdaSpec- Overrides:
hashCodein classObject
-
initializeCachedString
The initializer form_CachedString.- Returns:
- The return value for
toString().
-
toBuilder
Creates a new builder that is initialised with the components of this lambda.- Specified by:
toBuilderin interfaceLambdaSpec- Returns:
- The new builder.
-
toString
- Specified by:
toStringin interfaceLambdaSpec- Overrides:
toStringin classObject
-
