Record Class ELMethodExpressionDefinition
java.lang.Object
java.lang.Record
io.micronaut.el.processor.compiler.ELMethodExpressionDefinition
- Record Components:
expression- The expression stringreturnType- The expected return typeinferred- Whether the type was inferred from the static type of the expression rather than declaredparameterTypes- The expected parameter typesconstantName- The name of the generated constantnode- The parsed expression
@Internal
public record ELMethodExpressionDefinition(String expression, @Nullable io.micronaut.inject.ast.ClassElement returnType, boolean inferred, List<io.micronaut.inject.ast.ClassElement> parameterTypes, String constantName, ELNode node)
extends Record
A method expression declared with
io.micronaut.el.annotation.ELMethodExpression.- Since:
- 1.0
- Author:
- Denis Stepanov
-
Constructor Summary
ConstructorsConstructorDescriptionELMethodExpressionDefinition(String expression, @Nullable io.micronaut.inject.ast.ClassElement returnType, boolean inferred, List<io.micronaut.inject.ast.ClassElement> parameterTypes, String constantName, ELNode node) Creates an instance of aELMethodExpressionDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconstantNamerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpressionrecord component.final inthashCode()Returns a hash code value for this object.booleaninferred()Returns the value of theinferredrecord component.inferring(io.micronaut.inject.ast.ClassElement type) A definition whose expected return type was omitted, resolved to the static type of the invocation.node()Returns the value of thenoderecord component.List<io.micronaut.inject.ast.ClassElement> Returns the value of theparameterTypesrecord component.io.micronaut.inject.ast.ClassElement@Nullable io.micronaut.inject.ast.ClassElementReturns the value of thereturnTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ELMethodExpressionDefinition
public ELMethodExpressionDefinition(String expression, @Nullable io.micronaut.inject.ast.ClassElement returnType, boolean inferred, List<io.micronaut.inject.ast.ClassElement> parameterTypes, String constantName, ELNode node) Creates an instance of aELMethodExpressionDefinitionrecord class.- Parameters:
expression- the value for theexpressionrecord componentreturnType- the value for thereturnTyperecord componentinferred- the value for theinferredrecord componentparameterTypes- the value for theparameterTypesrecord componentconstantName- the value for theconstantNamerecord componentnode- the value for thenoderecord component
-
-
Method Details
-
inferring
A definition whose expected return type was omitted, resolved to the static type of the invocation.- Parameters:
type- The inferred type- Returns:
- The definition with the type
-
requireReturnType
public io.micronaut.inject.ast.ClassElement requireReturnType()- Returns:
- The return type, which inference has resolved by the time a writer reads it
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
expression
Returns the value of theexpressionrecord component.- Returns:
- the value of the
expressionrecord component
-
returnType
public @Nullable io.micronaut.inject.ast.ClassElement returnType()Returns the value of thereturnTyperecord component.- Returns:
- the value of the
returnTyperecord component
-
inferred
-
parameterTypes
Returns the value of theparameterTypesrecord component.- Returns:
- the value of the
parameterTypesrecord component
-
constantName
Returns the value of theconstantNamerecord component.- Returns:
- the value of the
constantNamerecord component
-
node
-