Package io.micronaut.inject.writer
Class DispatchWriter.AbstractDispatchTarget
java.lang.Object
io.micronaut.inject.writer.DispatchWriter.AbstractDispatchTarget
- All Implemented Interfaces:
DispatchWriter.DispatchTarget
- Direct Known Subclasses:
DispatchWriter.FieldGetDispatchTarget
,DispatchWriter.FieldSetDispatchTarget
,DispatchWriter.InterceptableMethodDispatchTarget
,DispatchWriter.KotlinMethodWithDefaultsDispatchTarget
,DispatchWriter.MethodDispatchTarget
,DispatchWriter.MethodReflectionDispatchTarget
- Enclosing class:
- DispatchWriter
@Internal
public abstract static class DispatchWriter.AbstractDispatchTarget
extends Object
implements DispatchWriter.DispatchTarget
Dispatch target implementation writer.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.sourcegen.model.StatementDef
dispatch
(io.micronaut.sourcegen.model.ExpressionDef target, io.micronaut.sourcegen.model.ExpressionDef valuesArray) Implement dispatch.protected io.micronaut.sourcegen.model.ExpressionDef
dispatchExpression
(io.micronaut.sourcegen.model.ExpressionDef target) Implements dispatch.protected io.micronaut.sourcegen.model.ExpressionDef
dispatchMultiExpression
(io.micronaut.sourcegen.model.ExpressionDef target, io.micronaut.sourcegen.model.ExpressionDef valuesArray) Implements multi dispatch.protected io.micronaut.sourcegen.model.ExpressionDef
dispatchMultiExpression
(io.micronaut.sourcegen.model.ExpressionDef target, List<? extends io.micronaut.sourcegen.model.ExpressionDef> values) Implements multi dispatch.io.micronaut.sourcegen.model.StatementDef
dispatchOne
(int caseValue, io.micronaut.sourcegen.model.ExpressionDef caseExpression, io.micronaut.sourcegen.model.ExpressionDef target, io.micronaut.sourcegen.model.ExpressionDef value) Implement dispatch one.protected io.micronaut.sourcegen.model.ExpressionDef
dispatchOneExpression
(io.micronaut.sourcegen.model.ExpressionDef target, io.micronaut.sourcegen.model.ExpressionDef value) Implements one dispatch.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.inject.writer.DispatchWriter.DispatchTarget
dispatch, getDeclaringType, getMethodElement, supportsDispatchMulti, supportsDispatchOne
-
Constructor Details
-
AbstractDispatchTarget
public AbstractDispatchTarget()
-
-
Method Details
-
dispatch
public io.micronaut.sourcegen.model.StatementDef dispatch(io.micronaut.sourcegen.model.ExpressionDef target, io.micronaut.sourcegen.model.ExpressionDef valuesArray) Implement dispatch.- Specified by:
dispatch
in interfaceDispatchWriter.DispatchTarget
- Parameters:
target
- The targetvaluesArray
- The values array- Returns:
- The dispatch statement
-
dispatchOne
public io.micronaut.sourcegen.model.StatementDef dispatchOne(int caseValue, io.micronaut.sourcegen.model.ExpressionDef caseExpression, io.micronaut.sourcegen.model.ExpressionDef target, io.micronaut.sourcegen.model.ExpressionDef value) Implement dispatch one.- Specified by:
dispatchOne
in interfaceDispatchWriter.DispatchTarget
- Parameters:
caseValue
- The case valuecaseExpression
- The case expressiontarget
- The targetvalue
- The value- Returns:
- The dispatch statement
-
dispatchMultiExpression
protected io.micronaut.sourcegen.model.ExpressionDef dispatchMultiExpression(io.micronaut.sourcegen.model.ExpressionDef target, io.micronaut.sourcegen.model.ExpressionDef valuesArray) Implements multi dispatch.- Parameters:
target
- The targetvaluesArray
- The values- Returns:
- THe expression
-
dispatchMultiExpression
protected io.micronaut.sourcegen.model.ExpressionDef dispatchMultiExpression(io.micronaut.sourcegen.model.ExpressionDef target, List<? extends io.micronaut.sourcegen.model.ExpressionDef> values) Implements multi dispatch.- Parameters:
target
- The targetvalues
- The values- Returns:
- The dispatch expression
-
dispatchOneExpression
protected io.micronaut.sourcegen.model.ExpressionDef dispatchOneExpression(io.micronaut.sourcegen.model.ExpressionDef target, io.micronaut.sourcegen.model.ExpressionDef value) Implements one dispatch.- Parameters:
target
- The targetvalue
- The value- Returns:
- The dispatch expression
-
dispatchExpression
protected io.micronaut.sourcegen.model.ExpressionDef dispatchExpression(io.micronaut.sourcegen.model.ExpressionDef target) Implements dispatch.- Parameters:
target
- The target- Returns:
- The dispatch expression
-