public static final class BazaarContext.Builder extends Object
BazaarContext
s.Modifier and Type | Method and Description |
---|---|
BazaarContext.Builder |
add(Object value)
Adds a self-typed context value.
|
BazaarContext |
build()
Create the bazaar context.
|
static BazaarContext.Builder |
empty()
Creates a new empty context builder.
|
<T> BazaarContext.Builder |
put(Class<T> key,
T value)
Adds a context value of the given type.
|
BazaarContext.Builder |
put(String name,
Object value)
Adds a context value for the given name, such as might be used with
named injection.
|
static BazaarContext.Builder |
with(Map<String,?> values)
Creates a new context builder with the given initial
values . |
public static BazaarContext.Builder empty()
public static BazaarContext.Builder with(Map<String,?> values)
values
.values
- initial context valuespublic <T> BazaarContext.Builder put(Class<T> key, T value)
T
- the value typekey
- the context value
's typevalue
- the context valuepublic BazaarContext.Builder add(Object value)
value
- the context value to addNullPointerException
- if the value
is null
put(Class, Object)
public BazaarContext.Builder put(String name, Object value)
name
- the context value
's namevalue
- the context valueNamed
public BazaarContext build()
Copyright © 2019. All rights reserved.