Module io.helidon.pico.api
Package io.helidon.pico.api
Class AbstractInvocationContext.Builder<B extends AbstractInvocationContext.Builder<B,T>,T extends InvocationContext>
java.lang.Object
io.helidon.pico.api.AbstractInvocationContext.Builder<B,T>
- Type Parameters:
B- the type of the builderT- the type of the built instance
- All Implemented Interfaces:
Builder<B,,T> InvocationContext,Supplier<T>
- Direct Known Subclasses:
DefaultInvocationContext.Builder
- Enclosing class:
AbstractInvocationContext
public abstract static class AbstractInvocationContext.Builder<B extends AbstractInvocationContext.Builder<B,T>,T extends InvocationContext>
extends Object
implements InvocationContext, Builder<B,T>
Fluent API builder for
T.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ListField value forjava.util.List<io.helidon.common.types.AnnotationAndValue> classAnnotations().protected final MapField value forjava.util.Map<java.lang.String, java.lang.Object> contextData().protected final ListField value forjava.util.List<jakarta.inject.Provider<io.helidon.pico.api.Interceptor>> interceptors(). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAccept and update from the provided value object.The annotations on the enclosing type.Setter for 'classAnnotations'.The contextual info that can be shared between interceptors.contextData(Map<String, Object> val) Setter for 'contextData'.The method/element argument info.elementArgInfo(TypedElementName[] val) Setter for 'elementArgInfo'.elementArgInfo(Optional<TypedElementName[]> val) Setter for 'elementArgInfo'.The element info represents the method (or the constructor) being invoked.Setter for 'elementInfo'.The interceptor chain.Setter for 'interceptors'.The service provider being intercepted.serviceProvider(ServiceProvider<?> val) Setter for 'serviceProvider'.The service type name for the root service provider.serviceTypeName(TypeName val) Setter for 'serviceTypeName'.<T> voidvisitAttributes(AttributeVisitor<T> visitor, T userDefinedCtx) Visits all attributes of io.helidon.pico.api.InvocationContext, calling theAttributeVisitorfor each.
-
Field Details
-
classAnnotations
Field value forjava.util.List<io.helidon.common.types.AnnotationAndValue> classAnnotations(). -
interceptors
Field value forjava.util.List<jakarta.inject.Provider<io.helidon.pico.api.Interceptor>> interceptors(). -
contextData
Field value forjava.util.Map<java.lang.String, java.lang.Object> contextData().
-
-
Constructor Details
-
Builder
protected Builder()Fluent API builder constructor.
-
-
Method Details
-
serviceProvider
Description copied from interface:InvocationContextThe service provider being intercepted.- Specified by:
serviceProviderin interfaceInvocationContext- Returns:
- the service provider being intercepted
-
serviceTypeName
Description copied from interface:InvocationContextThe service type name for the root service provider.- Specified by:
serviceTypeNamein interfaceInvocationContext- Returns:
- the service type name for the root service provider
-
classAnnotations
Description copied from interface:InvocationContextThe annotations on the enclosing type.- Specified by:
classAnnotationsin interfaceInvocationContext- Returns:
- the annotations on the enclosing type
-
elementInfo
Description copied from interface:InvocationContextThe element info represents the method (or the constructor) being invoked.- Specified by:
elementInfoin interfaceInvocationContext- Returns:
- the element info represents the method (or the constructor) being invoked
-
elementArgInfo
Description copied from interface:InvocationContextThe method/element argument info.- Specified by:
elementArgInfoin interfaceInvocationContext- Returns:
- the method/element argument info
-
interceptors
Description copied from interface:InvocationContextThe interceptor chain.- Specified by:
interceptorsin interfaceInvocationContext- Returns:
- the interceptor chain
-
contextData
Description copied from interface:InvocationContextThe contextual info that can be shared between interceptors.- Specified by:
contextDatain interfaceInvocationContext- Returns:
- the read/write contextual data that is passed between each chained interceptor
-
serviceProvider
Setter for 'serviceProvider'.- Parameters:
val- the new value- Returns:
- this fluent builder
-
serviceTypeName
Setter for 'serviceTypeName'.- Parameters:
val- the new value- Returns:
- this fluent builder
-
classAnnotations
Setter for 'classAnnotations'.- Parameters:
val- the new value- Returns:
- this fluent builder
-
elementInfo
Setter for 'elementInfo'.- Parameters:
val- the new value- Returns:
- this fluent builder
-
elementArgInfo
Setter for 'elementArgInfo'.- Parameters:
val- the new value- Returns:
- this fluent builder
-
elementArgInfo
Setter for 'elementArgInfo'.- Parameters:
val- the new value- Returns:
- this fluent builder
-
interceptors
Setter for 'interceptors'.- Parameters:
val- the new value- Returns:
- this fluent builder
-
contextData
Setter for 'contextData'.- Parameters:
val- the new value- Returns:
- this fluent builder
-
accept
Accept and update from the provided value object.- Parameters:
val- the value object to copy from- Returns:
- this instance typed to correct type
-
visitAttributes
Visits all attributes of io.helidon.pico.api.InvocationContext, calling theAttributeVisitorfor each.- Type Parameters:
T- type of the user defined context- Parameters:
visitor- the visitor called for each attributeuserDefinedCtx- any object you wish to pass to each visit call
-